mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 09:15:42 +00:00
chore: fix clippy lints (#1882)
This commit is contained in:
@@ -324,7 +324,7 @@ fn calls_differences<'a>(
|
|||||||
pallet_metadata_1: &'a PalletMetadata<'a>,
|
pallet_metadata_1: &'a PalletMetadata<'a>,
|
||||||
pallet_metadata_2: &'a PalletMetadata<'a>,
|
pallet_metadata_2: &'a PalletMetadata<'a>,
|
||||||
) -> Vec<Diff<&'a Variant<PortableForm>>> {
|
) -> Vec<Diff<&'a Variant<PortableForm>>> {
|
||||||
return diff(
|
diff(
|
||||||
pallet_metadata_1.call_variants().unwrap_or_default(),
|
pallet_metadata_1.call_variants().unwrap_or_default(),
|
||||||
pallet_metadata_2.call_variants().unwrap_or_default(),
|
pallet_metadata_2.call_variants().unwrap_or_default(),
|
||||||
|e| {
|
|e| {
|
||||||
@@ -338,7 +338,7 @@ fn calls_differences<'a>(
|
|||||||
.expect("call is in metadata; qed")
|
.expect("call is in metadata; qed")
|
||||||
},
|
},
|
||||||
|e| &e.name,
|
|e| &e.name,
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn constants_differences<'a>(
|
fn constants_differences<'a>(
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ pub struct StorageHashersIter<'a> {
|
|||||||
idx: usize,
|
idx: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> StorageHashersIter<'a> {
|
impl StorageHashersIter<'_> {
|
||||||
fn next_or_err(&mut self) -> Result<(StorageHasher, u32), Error> {
|
fn next_or_err(&mut self) -> Result<(StorageHasher, u32), Error> {
|
||||||
self.next().ok_or_else(|| {
|
self.next().ok_or_else(|| {
|
||||||
StorageAddressError::TooManyKeys {
|
StorageAddressError::TooManyKeys {
|
||||||
@@ -97,7 +97,7 @@ impl<'a> StorageHashersIter<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Iterator for StorageHashersIter<'a> {
|
impl Iterator for StorageHashersIter<'_> {
|
||||||
type Item = (StorageHasher, u32);
|
type Item = (StorageHasher, u32);
|
||||||
|
|
||||||
fn next(&mut self) -> Option<Self::Item> {
|
fn next(&mut self) -> Option<Self::Item> {
|
||||||
@@ -107,7 +107,7 @@ impl<'a> Iterator for StorageHashersIter<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> ExactSizeIterator for StorageHashersIter<'a> {
|
impl ExactSizeIterator for StorageHashersIter<'_> {
|
||||||
fn len(&self) -> usize {
|
fn len(&self) -> usize {
|
||||||
self.hashers.hashers_and_ty_ids.len() - self.idx
|
self.hashers.hashers_and_ty_ids.len() - self.idx
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ impl<'a> From<&'a str> for ChainConfig<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> From<String> for ChainConfig<'a> {
|
impl From<String> for ChainConfig<'_> {
|
||||||
fn from(chain_spec: String) -> Self {
|
fn from(chain_spec: String) -> Self {
|
||||||
ChainConfig::chain_spec(chain_spec)
|
ChainConfig::chain_spec(chain_spec)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -788,7 +788,7 @@ pub(crate) mod unsigned_number_as_string {
|
|||||||
|
|
||||||
struct NumberVisitor<N>(std::marker::PhantomData<N>);
|
struct NumberVisitor<N>(std::marker::PhantomData<N>);
|
||||||
|
|
||||||
impl<'de, N: From<u64>> Visitor<'de> for NumberVisitor<N> {
|
impl<N: From<u64>> Visitor<'_> for NumberVisitor<N> {
|
||||||
type Value = N;
|
type Value = N;
|
||||||
|
|
||||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ use scale_info::{
|
|||||||
/// See the `ModuleErrorType` in `subxt_codegen` for more info on the different DispatchError
|
/// 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
|
/// 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.
|
/// 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 type has TypeInfo compatible with the `NamedField` version of the DispatchError.
|
||||||
/// This is the oldest version that subxt supports:
|
/// This is the oldest version that subxt supports:
|
||||||
/// `DispatchError::Module { index: u8, error: u8 }`
|
/// `DispatchError::Module { index: u8, error: u8 }`
|
||||||
|
|||||||
Reference in New Issue
Block a user