mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
Update scale-info to 2.5.0 (#896)
* Upodate scale-info to 2.5.0 * A couple more clippy fixes * more deprecation things that appeared
This commit is contained in:
@@ -155,16 +155,16 @@ where
|
||||
}
|
||||
StorageEntryType::Map { hashers, key, .. } => {
|
||||
let ty = metadata
|
||||
.resolve_type(key.id())
|
||||
.ok_or_else(|| StorageAddressError::TypeNotFound(key.id()))?;
|
||||
.resolve_type(key.id)
|
||||
.ok_or(StorageAddressError::TypeNotFound(key.id))?;
|
||||
|
||||
// If the key is a tuple, we encode each value to the corresponding tuple type.
|
||||
// If the key is not a tuple, encode a single value to the key type.
|
||||
let type_ids = match ty.type_def() {
|
||||
let type_ids = match &ty.type_def {
|
||||
TypeDef::Tuple(tuple) => {
|
||||
either::Either::Left(tuple.fields().iter().map(|f| f.id()))
|
||||
either::Either::Left(tuple.fields.iter().map(|f| f.id))
|
||||
}
|
||||
_other => either::Either::Right(std::iter::once(key.id())),
|
||||
_other => either::Either::Right(std::iter::once(key.id)),
|
||||
};
|
||||
|
||||
if type_ids.len() != self.storage_entry_keys.len() {
|
||||
|
||||
@@ -352,8 +352,8 @@ fn lookup_storage_return_type(
|
||||
/// Fetch the return type out of a [`StorageEntryType`].
|
||||
fn return_type_from_storage_entry_type(entry: &StorageEntryType<PortableForm>) -> u32 {
|
||||
match entry {
|
||||
StorageEntryType::Plain(ty) => ty.id(),
|
||||
StorageEntryType::Map { value, .. } => value.id(),
|
||||
StorageEntryType::Plain(ty) => ty.id,
|
||||
StorageEntryType::Map { value, .. } => value.id,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -367,8 +367,8 @@ fn decode_storage_with_metadata<T: DecodeWithMetadata>(
|
||||
let ty = &metadata.pallet(pallet_name)?.storage(storage_entry)?.ty;
|
||||
|
||||
let id = match ty {
|
||||
StorageEntryType::Plain(ty) => ty.id(),
|
||||
StorageEntryType::Map { value, .. } => value.id(),
|
||||
StorageEntryType::Plain(ty) => ty.id,
|
||||
StorageEntryType::Map { value, .. } => value.id,
|
||||
};
|
||||
|
||||
let val = T::decode_with_metadata(bytes, id, metadata)?;
|
||||
|
||||
Reference in New Issue
Block a user