Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
shawntabrizi committed Sep 23, 2024
1 parent e0588cd commit 1940faa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
17 changes: 14 additions & 3 deletions substrate/frame/support/src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,10 @@ pub trait TryAppendNMap<K: KeyGenerator, T: StorageTryAppend<I>, 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<LikeK: EncodeLikeTuple<K::KArg> + TupleToEncodedIter + Clone, LikeI: EncodeLike<I>>(
fn try_append<
LikeK: EncodeLikeTuple<K::KArg> + TupleToEncodedIter + Clone,
LikeI: EncodeLike<I>,
>(
key: LikeK,
item: LikeI,
) -> Result<(), ()>;
Expand All @@ -1711,7 +1714,10 @@ where
I: Encode,
StorageNMapT: generator::StorageNMap<K, T>,
{
fn try_append<LikeK: EncodeLikeTuple<K::KArg> + TupleToEncodedIter + Clone, LikeI: EncodeLike<I>>(
fn try_append<
LikeK: EncodeLikeTuple<K::KArg> + TupleToEncodedIter + Clone,
LikeI: EncodeLike<I>,
>(
key: LikeK,
item: LikeI,
) -> Result<(), ()> {
Expand Down Expand Up @@ -2056,7 +2062,12 @@ mod test {
#[crate::storage_alias]
type FooQuadMap = StorageNMap<
Prefix,
(NMapKey<Twox128, u32>, NMapKey<Twox128, u32>, NMapKey<Twox128, u32>, NMapKey<Twox128, u32>),
(
NMapKey<Twox128, u32>,
NMapKey<Twox128, u32>,
NMapKey<Twox128, u32>,
NMapKey<Twox128, u32>,
),
BoundedVec<u32, ConstU32<7>>,
>;

Expand Down
3 changes: 2 additions & 1 deletion substrate/frame/support/src/storage/types/nmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
};
Expand Down

0 comments on commit 1940faa

Please sign in to comment.