Skip to content

Commit

Permalink
Use where consistently for long trait restriction lists
Browse files Browse the repository at this point in the history
  • Loading branch information
webmaster128 committed Apr 13, 2021
1 parent 0223d30 commit 22aaa6f
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions packages/std/src/results/cosmos_msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,20 @@ where
})
}

impl<T: Clone + fmt::Debug + PartialEq + JsonSchema> From<BankMsg> for CosmosMsg<T> {
impl<T> From<BankMsg> for CosmosMsg<T>
where
T: Clone + fmt::Debug + PartialEq + JsonSchema,
{
fn from(msg: BankMsg) -> Self {
CosmosMsg::Bank(msg)
}
}

#[cfg(feature = "staking")]
impl<T: Clone + fmt::Debug + PartialEq + JsonSchema> From<StakingMsg> for CosmosMsg<T> {
impl<T> From<StakingMsg> for CosmosMsg<T>
where
T: Clone + fmt::Debug + PartialEq + JsonSchema,
{
fn from(msg: StakingMsg) -> Self {
CosmosMsg::Staking(msg)
}
Expand All @@ -205,14 +211,20 @@ where
}
}

impl<T: Clone + fmt::Debug + PartialEq + JsonSchema> From<WasmMsg> for CosmosMsg<T> {
impl<T> From<WasmMsg> for CosmosMsg<T>
where
T: Clone + fmt::Debug + PartialEq + JsonSchema,
{
fn from(msg: WasmMsg) -> Self {
CosmosMsg::Wasm(msg)
}
}

#[cfg(feature = "stargate")]
impl<T: Clone + fmt::Debug + PartialEq + JsonSchema> From<IbcMsg> for CosmosMsg<T> {
impl<T> From<IbcMsg> for CosmosMsg<T>
where
T: Clone + fmt::Debug + PartialEq + JsonSchema,
{
fn from(msg: IbcMsg) -> Self {
CosmosMsg::Ibc(msg)
}
Expand Down

0 comments on commit 22aaa6f

Please sign in to comment.