Skip to content

Commit 242e882

Browse files
committed
fix complex clippy error
1 parent f4458af commit 242e882

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pallets/rmrk-core/src/lib.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ pub type KeyLimitOf<T> = BoundedVec<u8, <T as pallet_uniques::Config>::KeyLimit>
4646

4747
pub type ValueLimitOf<T> = BoundedVec<u8, <T as pallet_uniques::Config>::ValueLimit>;
4848

49+
pub type BoundedResourceTypeOf<T> = BoundedVec<
50+
ResourceTypes<
51+
BoundedVec<u8, <T as pallet_uniques::Config>::StringLimit>,
52+
BoundedVec<PartId, <T as Config>::PartsLimit>>,
53+
<T as Config>::MaxResourcesOnMint
54+
>;
55+
4956
pub mod types;
5057

5158
// Re-export pallet items so that they can be accessed from the crate namespace.
@@ -345,12 +352,7 @@ pub mod pallet {
345352
royalty: Option<Permill>,
346353
metadata: BoundedVec<u8, T::StringLimit>,
347354
transferable: bool,
348-
resources: Option<
349-
BoundedVec<
350-
ResourceTypes<BoundedVec<u8, T::StringLimit>, BoundedVec<PartId, T::PartsLimit>>,
351-
T::MaxResourcesOnMint
352-
>
353-
>
355+
resources: Option<BoundedResourceTypeOf<T>>
354356
) -> DispatchResult {
355357
let sender = ensure_signed(origin.clone())?;
356358
if let Some(collection_issuer) = pallet_uniques::Pallet::<T>::collection_owner(collection_id)

0 commit comments

Comments
 (0)