From 31049b100a6b5dc15bd7b786c954001537020a81 Mon Sep 17 00:00:00 2001 From: yito88 Date: Sat, 30 Nov 2024 22:56:27 +0100 Subject: [PATCH] for clippy of rust 1.83.0 --- tools/test-framework/src/chain/ext/async_icq.rs | 2 +- tools/test-framework/src/chain/ext/authz.rs | 2 +- .../src/chain/ext/crosschainquery.rs | 2 +- tools/test-framework/src/chain/ext/fee.rs | 2 +- tools/test-framework/src/chain/ext/fee_grant.rs | 2 +- tools/test-framework/src/chain/ext/ica.rs | 2 +- tools/test-framework/src/chain/ext/proposal.rs | 2 +- tools/test-framework/src/chain/ext/transfer.rs | 2 +- tools/test-framework/src/chain/ext/version.rs | 2 +- tools/test-framework/src/chain/ext/wasm_client.rs | 2 +- tools/test-framework/src/chain/tagged.rs | 2 +- tools/test-framework/src/framework/base.rs | 2 +- tools/test-framework/src/framework/binary/chain.rs | 12 ++++++------ .../test-framework/src/framework/binary/channel.rs | 10 +++++----- .../src/framework/binary/connection.rs | 12 +++++------- tools/test-framework/src/framework/binary/ics.rs | 4 ++-- tools/test-framework/src/framework/binary/node.rs | 8 ++++---- tools/test-framework/src/framework/nary/chain.rs | 14 +++++++------- tools/test-framework/src/framework/nary/channel.rs | 12 ++++++------ .../src/framework/nary/connection.rs | 4 ++-- 20 files changed, 49 insertions(+), 51 deletions(-) diff --git a/tools/test-framework/src/chain/ext/async_icq.rs b/tools/test-framework/src/chain/ext/async_icq.rs index 88dd7f7aa6..ec0a59fa56 100644 --- a/tools/test-framework/src/chain/ext/async_icq.rs +++ b/tools/test-framework/src/chain/ext/async_icq.rs @@ -10,7 +10,7 @@ pub trait AsyncIcqMethodsExt { fn async_icq(&self, channel_id: &ChannelId, query_json: &str, from: &str) -> Result<(), Error>; } -impl<'a, Chain: Send> AsyncIcqMethodsExt for MonoTagged { +impl AsyncIcqMethodsExt for MonoTagged { fn update_oracle(&self, relayer: &str, fees: &str, init_args: &str) -> Result<(), Error> { let driver = *self.value(); diff --git a/tools/test-framework/src/chain/ext/authz.rs b/tools/test-framework/src/chain/ext/authz.rs index e6a8ad09a7..a87cda86b2 100644 --- a/tools/test-framework/src/chain/ext/authz.rs +++ b/tools/test-framework/src/chain/ext/authz.rs @@ -36,7 +36,7 @@ pub trait AuthzMethodsExt { ) -> Result<(), Error>; } -impl<'a, Chain: Send> AuthzMethodsExt for MonoTagged { +impl AuthzMethodsExt for MonoTagged { fn authz_grant( &self, granter: &str, diff --git a/tools/test-framework/src/chain/ext/crosschainquery.rs b/tools/test-framework/src/chain/ext/crosschainquery.rs index dbdbaa9500..35ad76d116 100644 --- a/tools/test-framework/src/chain/ext/crosschainquery.rs +++ b/tools/test-framework/src/chain/ext/crosschainquery.rs @@ -22,7 +22,7 @@ pub trait CrossChainQueryMethodsExt { fn assert_processed_cross_chain_query(&self) -> Result<(), Error>; } -impl<'a, Chain: Send> CrossChainQueryMethodsExt for MonoTagged { +impl CrossChainQueryMethodsExt for MonoTagged { fn assert_pending_cross_chain_query(&self) -> Result<(), Error> { assert_eventually_succeed( "waiting for a cross chain query request", diff --git a/tools/test-framework/src/chain/ext/fee.rs b/tools/test-framework/src/chain/ext/fee.rs index b3783304fa..8dc8f81c41 100644 --- a/tools/test-framework/src/chain/ext/fee.rs +++ b/tools/test-framework/src/chain/ext/fee.rs @@ -69,7 +69,7 @@ pub trait ChainFeeMethodsExt { ) -> Result, Error>; } -impl<'a, Chain: Send> ChainFeeMethodsExt for MonoTagged { +impl ChainFeeMethodsExt for MonoTagged { fn ibc_token_transfer_with_fee( &self, port_id: &TaggedPortIdRef<'_, Chain, Counterparty>, diff --git a/tools/test-framework/src/chain/ext/fee_grant.rs b/tools/test-framework/src/chain/ext/fee_grant.rs index ca8dcb156e..e63de5a6fc 100644 --- a/tools/test-framework/src/chain/ext/fee_grant.rs +++ b/tools/test-framework/src/chain/ext/fee_grant.rs @@ -11,7 +11,7 @@ pub trait FeeGrantMethodsExt { ) -> Result<(), Error>; } -impl<'a, Chain: Send> FeeGrantMethodsExt for MonoTagged { +impl FeeGrantMethodsExt for MonoTagged { fn feegrant_grant( &self, granter: &str, diff --git a/tools/test-framework/src/chain/ext/ica.rs b/tools/test-framework/src/chain/ext/ica.rs index 93c37d2a29..f335774d31 100644 --- a/tools/test-framework/src/chain/ext/ica.rs +++ b/tools/test-framework/src/chain/ext/ica.rs @@ -27,7 +27,7 @@ pub trait InterchainAccountMethodsExt { ) -> Result, Error>; } -impl<'a, Chain: Send> InterchainAccountMethodsExt for MonoTagged { +impl InterchainAccountMethodsExt for MonoTagged { fn register_interchain_account_cli( &self, from: &MonoTagged, diff --git a/tools/test-framework/src/chain/ext/proposal.rs b/tools/test-framework/src/chain/ext/proposal.rs index ec7010323a..91c61b9f39 100644 --- a/tools/test-framework/src/chain/ext/proposal.rs +++ b/tools/test-framework/src/chain/ext/proposal.rs @@ -53,7 +53,7 @@ pub trait ChainProposalMethodsExt { ) -> Result<(), Error>; } -impl<'a, Chain: Send> ChainProposalMethodsExt for MonoTagged { +impl ChainProposalMethodsExt for MonoTagged { fn query_upgrade_proposal_height( &self, grpc_address: &Uri, diff --git a/tools/test-framework/src/chain/ext/transfer.rs b/tools/test-framework/src/chain/ext/transfer.rs index b5580b4f37..55c0f08661 100644 --- a/tools/test-framework/src/chain/ext/transfer.rs +++ b/tools/test-framework/src/chain/ext/transfer.rs @@ -89,7 +89,7 @@ pub trait ChainTransferMethodsExt { ) -> Result<(), Error>; } -impl<'a, Chain: Send> ChainTransferMethodsExt for MonoTagged { +impl ChainTransferMethodsExt for MonoTagged { fn ibc_transfer_token( &self, port_id: &TaggedPortIdRef, diff --git a/tools/test-framework/src/chain/ext/version.rs b/tools/test-framework/src/chain/ext/version.rs index be1d6582ff..3156ddacd9 100644 --- a/tools/test-framework/src/chain/ext/version.rs +++ b/tools/test-framework/src/chain/ext/version.rs @@ -7,7 +7,7 @@ pub trait ChainVersionMethodsExt { fn major_version(&self) -> Result; } -impl<'a, Chain: Send> ChainVersionMethodsExt for MonoTagged { +impl ChainVersionMethodsExt for MonoTagged { fn major_version(&self) -> Result { major_version(&self.value().command_path) } diff --git a/tools/test-framework/src/chain/ext/wasm_client.rs b/tools/test-framework/src/chain/ext/wasm_client.rs index cfcb657dd0..70cebfb430 100644 --- a/tools/test-framework/src/chain/ext/wasm_client.rs +++ b/tools/test-framework/src/chain/ext/wasm_client.rs @@ -27,7 +27,7 @@ pub trait StoreWasmClientCodeMethodsExt { ) -> Result; } -impl<'a, Chain: Send> StoreWasmClientCodeMethodsExt for MonoTagged { +impl StoreWasmClientCodeMethodsExt for MonoTagged { fn store_wasm_client_code( &self, wasm_path: &Path, diff --git a/tools/test-framework/src/chain/tagged.rs b/tools/test-framework/src/chain/tagged.rs index 65ed2d20ab..8f324bf922 100644 --- a/tools/test-framework/src/chain/tagged.rs +++ b/tools/test-framework/src/chain/tagged.rs @@ -111,7 +111,7 @@ pub trait TaggedChainDriverExt { fn query_auth_module(&self, module_name: &str) -> Result; } -impl<'a, Chain: Send> TaggedChainDriverExt for MonoTagged { +impl TaggedChainDriverExt for MonoTagged { fn chain_id(&self) -> TaggedChainIdRef { self.map_ref(|val| &val.chain_id) } diff --git a/tools/test-framework/src/framework/base.rs b/tools/test-framework/src/framework/base.rs index 0ba59ea9fb..e7e0415b5d 100644 --- a/tools/test-framework/src/framework/base.rs +++ b/tools/test-framework/src/framework/base.rs @@ -84,7 +84,7 @@ pub struct RunBasicTest<'a, Test> { pub test: &'a Test, } -impl<'a, Test, Overrides> PrimitiveTest for RunBasicTest<'a, Test> +impl PrimitiveTest for RunBasicTest<'_, Test> where Test: BasicTest, Test: HasOverrides, diff --git a/tools/test-framework/src/framework/binary/chain.rs b/tools/test-framework/src/framework/binary/chain.rs index 519fb855a0..2c753f2c5a 100644 --- a/tools/test-framework/src/framework/binary/chain.rs +++ b/tools/test-framework/src/framework/binary/chain.rs @@ -204,7 +204,7 @@ where } } -impl<'a, Test, Overrides> BinaryNodeTest for RunBinaryChainTest<'a, Test> +impl BinaryNodeTest for RunBinaryChainTest<'_, Test> where Test: BinaryChainTest, Test: HasOverrides, @@ -243,7 +243,7 @@ where } } -impl<'a, Test, Overrides> InterchainSecurityChainTest for RunBinaryChainTest<'a, Test> +impl InterchainSecurityChainTest for RunBinaryChainTest<'_, Test> where Test: BinaryChainTest, Test: HasOverrides, @@ -282,7 +282,7 @@ where } } -impl<'a, Test: BinaryChainTest> BinaryChainTest for RunTwoWayBinaryChainTest<'a, Test> { +impl BinaryChainTest for RunTwoWayBinaryChainTest<'_, Test> { fn run( &self, config: &TestConfig, @@ -311,7 +311,7 @@ impl<'a, Test: BinaryChainTest> BinaryChainTest for RunTwoWayBinaryChainTest<'a, } } -impl<'a, Test, Overrides> BinaryChainTest for RunWithSupervisor<'a, Test> +impl BinaryChainTest for RunWithSupervisor<'_, Test> where Test: BinaryChainTest, Test: HasOverrides, @@ -335,7 +335,7 @@ where } } -impl<'a, Test, Overrides> HasOverrides for RunBinaryChainTest<'a, Test> +impl HasOverrides for RunBinaryChainTest<'_, Test> where Test: HasOverrides, { @@ -346,7 +346,7 @@ where } } -impl<'a, Test, Overrides> HasOverrides for RunTwoWayBinaryChainTest<'a, Test> +impl HasOverrides for RunTwoWayBinaryChainTest<'_, Test> where Test: HasOverrides, { diff --git a/tools/test-framework/src/framework/binary/channel.rs b/tools/test-framework/src/framework/binary/channel.rs index c53120b951..3f3d964da2 100644 --- a/tools/test-framework/src/framework/binary/channel.rs +++ b/tools/test-framework/src/framework/binary/channel.rs @@ -207,7 +207,7 @@ where } } -impl<'a, Test, Overrides> BinaryConnectionTest for RunBinaryChannelTest<'a, Test> +impl BinaryConnectionTest for RunBinaryChannelTest<'_, Test> where Test: BinaryChannelTest, Test: HasOverrides, @@ -251,7 +251,7 @@ where } } -impl<'a, Test: BinaryChannelTest> BinaryChannelTest for RunTwoWayBinaryChannelTest<'a, Test> { +impl BinaryChannelTest for RunTwoWayBinaryChannelTest<'_, Test> { fn run( &self, config: &TestConfig, @@ -287,7 +287,7 @@ impl<'a, Test: BinaryChannelTest> BinaryChannelTest for RunTwoWayBinaryChannelTe } } -impl<'a, Test, Overrides> BinaryChannelTest for RunWithSupervisor<'a, Test> +impl BinaryChannelTest for RunWithSupervisor<'_, Test> where Test: BinaryChannelTest, Test: HasOverrides, @@ -312,7 +312,7 @@ where } } -impl<'a, Test, Overrides> HasOverrides for RunBinaryChannelTest<'a, Test> +impl HasOverrides for RunBinaryChannelTest<'_, Test> where Test: HasOverrides, { @@ -323,7 +323,7 @@ where } } -impl<'a, Test, Overrides> HasOverrides for RunTwoWayBinaryChannelTest<'a, Test> +impl HasOverrides for RunTwoWayBinaryChannelTest<'_, Test> where Test: HasOverrides, { diff --git a/tools/test-framework/src/framework/binary/connection.rs b/tools/test-framework/src/framework/binary/connection.rs index 8b7c3ec56f..0f01082f98 100644 --- a/tools/test-framework/src/framework/binary/connection.rs +++ b/tools/test-framework/src/framework/binary/connection.rs @@ -144,7 +144,7 @@ where } } -impl<'a, Test, Overrides> BinaryChainTest for RunBinaryConnectionTest<'a, Test> +impl BinaryChainTest for RunBinaryConnectionTest<'_, Test> where Test: BinaryConnectionTest, Test: HasOverrides, @@ -174,9 +174,7 @@ where } } -impl<'a, Test: BinaryConnectionTest> BinaryConnectionTest - for RunTwoWayBinaryConnectionTest<'a, Test> -{ +impl BinaryConnectionTest for RunTwoWayBinaryConnectionTest<'_, Test> { fn run( &self, config: &TestConfig, @@ -212,7 +210,7 @@ impl<'a, Test: BinaryConnectionTest> BinaryConnectionTest } } -impl<'a, Test, Overrides> BinaryConnectionTest for RunWithSupervisor<'a, Test> +impl BinaryConnectionTest for RunWithSupervisor<'_, Test> where Test: BinaryConnectionTest, Test: HasOverrides, @@ -237,7 +235,7 @@ where } } -impl<'a, Test, Overrides> HasOverrides for RunBinaryConnectionTest<'a, Test> +impl HasOverrides for RunBinaryConnectionTest<'_, Test> where Test: HasOverrides, { @@ -248,7 +246,7 @@ where } } -impl<'a, Test, Overrides> HasOverrides for RunTwoWayBinaryConnectionTest<'a, Test> +impl HasOverrides for RunTwoWayBinaryConnectionTest<'_, Test> where Test: HasOverrides, { diff --git a/tools/test-framework/src/framework/binary/ics.rs b/tools/test-framework/src/framework/binary/ics.rs index e620ccfedc..7117fea5c2 100644 --- a/tools/test-framework/src/framework/binary/ics.rs +++ b/tools/test-framework/src/framework/binary/ics.rs @@ -47,7 +47,7 @@ where } } -impl<'a, Test, Overrides> BasicTest for RunInterchainSecurityChainTest<'a, Test> +impl BasicTest for RunInterchainSecurityChainTest<'_, Test> where Test: InterchainSecurityChainTest, Test: HasOverrides, @@ -104,7 +104,7 @@ where } } -impl<'a, Test, Overrides> HasOverrides for RunInterchainSecurityChainTest<'a, Test> +impl HasOverrides for RunInterchainSecurityChainTest<'_, Test> where Test: HasOverrides, { diff --git a/tools/test-framework/src/framework/binary/node.rs b/tools/test-framework/src/framework/binary/node.rs index de7a35ba50..528a4dd021 100644 --- a/tools/test-framework/src/framework/binary/node.rs +++ b/tools/test-framework/src/framework/binary/node.rs @@ -113,7 +113,7 @@ pub struct RunSingleNodeTest<'a, Test> { pub test: &'a Test, } -impl<'a, Test, Overrides> BasicTest for RunBinaryNodeTest<'a, Test> +impl BasicTest for RunBinaryNodeTest<'_, Test> where Test: BinaryNodeTest, Test: HasOverrides, @@ -180,7 +180,7 @@ where } } -impl<'a, Test, Overrides> BasicTest for RunSingleNodeTest<'a, Test> +impl BasicTest for RunSingleNodeTest<'_, Test> where Test: BinaryNodeTest, Test: HasOverrides, @@ -221,7 +221,7 @@ where } } -impl<'a, Test, Overrides> HasOverrides for RunBinaryNodeTest<'a, Test> +impl HasOverrides for RunBinaryNodeTest<'_, Test> where Test: HasOverrides, { @@ -232,7 +232,7 @@ where } } -impl<'a, Test, Overrides> HasOverrides for RunSingleNodeTest<'a, Test> +impl HasOverrides for RunSingleNodeTest<'_, Test> where Test: HasOverrides, { diff --git a/tools/test-framework/src/framework/nary/chain.rs b/tools/test-framework/src/framework/nary/chain.rs index 8928d5c55e..19fff4dc00 100644 --- a/tools/test-framework/src/framework/nary/chain.rs +++ b/tools/test-framework/src/framework/nary/chain.rs @@ -127,7 +127,7 @@ pub struct RunSelfConnectedNaryChainTest<'a, Test, const SIZE: usize> { pub test: &'a Test, } -impl<'a, Test, Overrides, const SIZE: usize> NaryNodeTest for RunNaryChainTest<'a, Test, SIZE> +impl NaryNodeTest for RunNaryChainTest<'_, Test, SIZE> where Test: NaryChainTest, Test: HasOverrides, @@ -161,8 +161,8 @@ where } } -impl<'a, Test, Overrides, const SIZE: usize> NaryNodeTest<1> - for RunSelfConnectedNaryChainTest<'a, Test, SIZE> +impl NaryNodeTest<1> + for RunSelfConnectedNaryChainTest<'_, Test, SIZE> where Test: NaryChainTest, Test: HasOverrides, @@ -196,7 +196,7 @@ where } } -impl<'a, Test, Overrides, const SIZE: usize> NaryChainTest for RunWithSupervisor<'a, Test> +impl NaryChainTest for RunWithSupervisor<'_, Test> where Test: NaryChainTest, Test: HasOverrides, @@ -238,7 +238,7 @@ where } } -impl<'a, Test, Overrides, const SIZE: usize> HasOverrides for RunNaryChainTest<'a, Test, SIZE> +impl HasOverrides for RunNaryChainTest<'_, Test, SIZE> where Test: HasOverrides, { @@ -249,8 +249,8 @@ where } } -impl<'a, Test, Overrides, const SIZE: usize> HasOverrides - for RunSelfConnectedNaryChainTest<'a, Test, SIZE> +impl HasOverrides + for RunSelfConnectedNaryChainTest<'_, Test, SIZE> where Test: HasOverrides, { diff --git a/tools/test-framework/src/framework/nary/channel.rs b/tools/test-framework/src/framework/nary/channel.rs index def43747e8..c48f728fd7 100644 --- a/tools/test-framework/src/framework/nary/channel.rs +++ b/tools/test-framework/src/framework/nary/channel.rs @@ -161,8 +161,8 @@ where } } -impl<'a, Test, Overrides, const SIZE: usize> NaryConnectionTest - for RunNaryChannelTest<'a, Test, SIZE> +impl NaryConnectionTest + for RunNaryChannelTest<'_, Test, SIZE> where Test: NaryChannelTest, Test: HasOverrides, @@ -198,7 +198,7 @@ where } } -impl<'a, Test> NaryChannelTest<2> for RunBinaryAsNaryChannelTest<'a, Test> +impl NaryChannelTest<2> for RunBinaryAsNaryChannelTest<'_, Test> where Test: BinaryChannelTest, { @@ -214,7 +214,7 @@ where } } -impl<'a, Test, Overrides, const SIZE: usize> NaryChannelTest for RunWithSupervisor<'a, Test> +impl NaryChannelTest for RunWithSupervisor<'_, Test> where Test: NaryChannelTest, Test: HasOverrides, @@ -239,7 +239,7 @@ where } } -impl<'a, Test, Overrides, const SIZE: usize> HasOverrides for RunNaryChannelTest<'a, Test, SIZE> +impl HasOverrides for RunNaryChannelTest<'_, Test, SIZE> where Test: HasOverrides, { @@ -250,7 +250,7 @@ where } } -impl<'a, Test, Overrides> HasOverrides for RunBinaryAsNaryChannelTest<'a, Test> +impl HasOverrides for RunBinaryAsNaryChannelTest<'_, Test> where Test: HasOverrides, { diff --git a/tools/test-framework/src/framework/nary/connection.rs b/tools/test-framework/src/framework/nary/connection.rs index 0b5244a55c..646ffdbd2e 100644 --- a/tools/test-framework/src/framework/nary/connection.rs +++ b/tools/test-framework/src/framework/nary/connection.rs @@ -95,8 +95,8 @@ where } } -impl<'a, Test, Overrides, const SIZE: usize> NaryChainTest - for RunNaryConnectionTest<'a, Test, SIZE> +impl NaryChainTest + for RunNaryConnectionTest<'_, Test, SIZE> where Test: NaryConnectionTest, Test: HasOverrides,