diff --git a/substrate/frame/support/src/storage/mod.rs b/substrate/frame/support/src/storage/mod.rs index 020d833e5d12..619392563035 100644 --- a/substrate/frame/support/src/storage/mod.rs +++ b/substrate/frame/support/src/storage/mod.rs @@ -1698,7 +1698,10 @@ pub trait TryAppendNMap, I: Encode> { /// Try and append the `item` into the storage N map at the given `key`. /// /// This might fail if bounds are not respected. - fn try_append + TupleToEncodedIter + Clone, LikeI: EncodeLike>( + fn try_append< + LikeK: EncodeLikeTuple + TupleToEncodedIter + Clone, + LikeI: EncodeLike, + >( key: LikeK, item: LikeI, ) -> Result<(), ()>; @@ -1711,7 +1714,10 @@ where I: Encode, StorageNMapT: generator::StorageNMap, { - fn try_append + TupleToEncodedIter + Clone, LikeI: EncodeLike>( + fn try_append< + LikeK: EncodeLikeTuple + TupleToEncodedIter + Clone, + LikeI: EncodeLike, + >( key: LikeK, item: LikeI, ) -> Result<(), ()> { @@ -2056,7 +2062,12 @@ mod test { #[crate::storage_alias] type FooQuadMap = StorageNMap< Prefix, - (NMapKey, NMapKey, NMapKey, NMapKey), + ( + NMapKey, + NMapKey, + NMapKey, + NMapKey, + ), BoundedVec>, >; diff --git a/substrate/frame/support/src/storage/types/nmap.rs b/substrate/frame/support/src/storage/types/nmap.rs index 07bf0c14f4a3..0fc22b35352d 100755 --- a/substrate/frame/support/src/storage/types/nmap.rs +++ b/substrate/frame/support/src/storage/types/nmap.rs @@ -24,7 +24,8 @@ use crate::{ EncodeLikeTuple, HasKeyPrefix, HasReversibleKeyPrefix, OptionQuery, QueryKindTrait, StorageEntryMetadataBuilder, TupleToEncodedIter, }, - KeyGenerator, PrefixIterator, StorageAppend, StorageDecodeLength, StoragePrefixedMap, StorageTryAppend + KeyGenerator, PrefixIterator, StorageAppend, StorageDecodeLength, StoragePrefixedMap, + StorageTryAppend, }, traits::{Get, GetDefault, StorageInfo, StorageInstance}, };