From 22aaa6f09de3f1e4949591aaead568d152d461c9 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 13 Apr 2021 17:12:05 +0200 Subject: [PATCH] Use where consistently for long trait restriction lists --- packages/std/src/results/cosmos_msg.rs | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/std/src/results/cosmos_msg.rs b/packages/std/src/results/cosmos_msg.rs index 4fe7eaa94d..18e5d144d4 100644 --- a/packages/std/src/results/cosmos_msg.rs +++ b/packages/std/src/results/cosmos_msg.rs @@ -183,14 +183,20 @@ where }) } -impl From for CosmosMsg { +impl From for CosmosMsg +where + T: Clone + fmt::Debug + PartialEq + JsonSchema, +{ fn from(msg: BankMsg) -> Self { CosmosMsg::Bank(msg) } } #[cfg(feature = "staking")] -impl From for CosmosMsg { +impl From for CosmosMsg +where + T: Clone + fmt::Debug + PartialEq + JsonSchema, +{ fn from(msg: StakingMsg) -> Self { CosmosMsg::Staking(msg) } @@ -205,14 +211,20 @@ where } } -impl From for CosmosMsg { +impl From for CosmosMsg +where + T: Clone + fmt::Debug + PartialEq + JsonSchema, +{ fn from(msg: WasmMsg) -> Self { CosmosMsg::Wasm(msg) } } #[cfg(feature = "stargate")] -impl From for CosmosMsg { +impl From for CosmosMsg +where + T: Clone + fmt::Debug + PartialEq + JsonSchema, +{ fn from(msg: IbcMsg) -> Self { CosmosMsg::Ibc(msg) }