diff --git a/cli/src/commands/diff.rs b/cli/src/commands/diff.rs index bc7f4c79ea..ebc2b7502b 100644 --- a/cli/src/commands/diff.rs +++ b/cli/src/commands/diff.rs @@ -324,7 +324,7 @@ fn calls_differences<'a>( pallet_metadata_1: &'a PalletMetadata<'a>, pallet_metadata_2: &'a PalletMetadata<'a>, ) -> Vec>> { - return diff( + diff( pallet_metadata_1.call_variants().unwrap_or_default(), pallet_metadata_2.call_variants().unwrap_or_default(), |e| { @@ -338,7 +338,7 @@ fn calls_differences<'a>( .expect("call is in metadata; qed") }, |e| &e.name, - ); + ) } fn constants_differences<'a>( diff --git a/core/src/storage/storage_key.rs b/core/src/storage/storage_key.rs index 1fb128b08a..8971bf794c 100644 --- a/core/src/storage/storage_key.rs +++ b/core/src/storage/storage_key.rs @@ -86,7 +86,7 @@ pub struct StorageHashersIter<'a> { idx: usize, } -impl<'a> StorageHashersIter<'a> { +impl StorageHashersIter<'_> { fn next_or_err(&mut self) -> Result<(StorageHasher, u32), Error> { self.next().ok_or_else(|| { StorageAddressError::TooManyKeys { @@ -97,7 +97,7 @@ impl<'a> StorageHashersIter<'a> { } } -impl<'a> Iterator for StorageHashersIter<'a> { +impl Iterator for StorageHashersIter<'_> { type Item = (StorageHasher, u32); fn next(&mut self) -> Option { @@ -107,7 +107,7 @@ impl<'a> Iterator for StorageHashersIter<'a> { } } -impl<'a> ExactSizeIterator for StorageHashersIter<'a> { +impl ExactSizeIterator for StorageHashersIter<'_> { fn len(&self) -> usize { self.hashers.hashers_and_ty_ids.len() - self.idx } diff --git a/lightclient/src/chain_config.rs b/lightclient/src/chain_config.rs index 66d5294476..a0a6219d3f 100644 --- a/lightclient/src/chain_config.rs +++ b/lightclient/src/chain_config.rs @@ -26,7 +26,7 @@ impl<'a> From<&'a str> for ChainConfig<'a> { } } -impl<'a> From for ChainConfig<'a> { +impl From for ChainConfig<'_> { fn from(chain_spec: String) -> Self { ChainConfig::chain_spec(chain_spec) } diff --git a/subxt/src/backend/chain_head/rpc_methods.rs b/subxt/src/backend/chain_head/rpc_methods.rs index 1eb715d980..a9779788a3 100644 --- a/subxt/src/backend/chain_head/rpc_methods.rs +++ b/subxt/src/backend/chain_head/rpc_methods.rs @@ -788,7 +788,7 @@ pub(crate) mod unsigned_number_as_string { struct NumberVisitor(std::marker::PhantomData); - impl<'de, N: From> Visitor<'de> for NumberVisitor { + impl> Visitor<'_> for NumberVisitor { type Value = N; fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result { diff --git a/testing/generate-custom-metadata/src/dispatch_error.rs b/testing/generate-custom-metadata/src/dispatch_error.rs index 7b81fd4d18..94f3648328 100644 --- a/testing/generate-custom-metadata/src/dispatch_error.rs +++ b/testing/generate-custom-metadata/src/dispatch_error.rs @@ -10,7 +10,7 @@ use scale_info::{ /// See the `ModuleErrorType` in `subxt_codegen` for more info on the different DispatchError /// types that we've encountered. We need the path to match `sp_runtime::DispatchError`, otherwise /// we could just implement roughly the correct types and derive TypeInfo on them. - +/// /// This type has TypeInfo compatible with the `NamedField` version of the DispatchError. /// This is the oldest version that subxt supports: /// `DispatchError::Module { index: u8, error: u8 }`