From c2beece3468757266f0b2f99545fc58b94e5ee26 Mon Sep 17 00:00:00 2001 From: Fahrrader Date: Thu, 02 Jun 2022 13:05:41 +0000 Subject: [PATCH] style(rmrk-proxy): cargo fmt --- --- a/pallets/proxy-rmrk-core/src/lib.rs +++ b/pallets/proxy-rmrk-core/src/lib.rs @@ -518,7 +518,8 @@ Ok(scoped_key) } - pub fn rmrk_property( // todo think about renaming this + pub fn rmrk_property( + // todo think about renaming this rmrk_key: RmrkProperty, value: &E, ) -> Result { @@ -533,20 +534,18 @@ Ok(property) } - - pub fn decode_property( - vec: PropertyValue, - ) -> Result { - vec.decode().map_err(|_| >::RmrkPropertyValueIsTooLong.into()) + + pub fn decode_property(vec: PropertyValue) -> Result { + vec.decode() + .map_err(|_| >::RmrkPropertyValueIsTooLong.into()) } - pub fn rebind( - vec: &BoundedVec, - ) -> Result, DispatchError> - where - BoundedVec: TryFrom> + pub fn rebind(vec: &BoundedVec) -> Result, DispatchError> + where + BoundedVec: TryFrom>, { - vec.rebind().map_err(|_| >::RmrkPropertyValueIsTooLong.into()) + vec.rebind() + .map_err(|_| >::RmrkPropertyValueIsTooLong.into()) } fn init_collection( @@ -727,9 +726,7 @@ collection_id: CollectionId, key: RmrkProperty, ) -> Result { - Self::decode_property( - Self::get_collection_property(collection_id, key)? - ) + Self::decode_property(Self::get_collection_property(collection_id, key)?) } pub fn get_collection_type( @@ -779,9 +776,7 @@ nft_id: TokenId, key: RmrkProperty, ) -> Result { - Self::decode_property( - Self::get_nft_property(collection_id, nft_id, key)? - ) + Self::decode_property(Self::get_nft_property(collection_id, nft_id, key)?) } pub fn nft_exists(collection_id: CollectionId, nft_id: TokenId) -> bool { --- a/pallets/proxy-rmrk-core/src/misc.rs +++ b/pallets/proxy-rmrk-core/src/misc.rs @@ -37,7 +37,8 @@ BoundedVec: TryFrom>, { fn rebind(&self) -> Result, Error> { - BoundedVec::::try_from(self.clone().into_inner()).map_err(|_| "BoundedVec exceeds its limit".into()) + BoundedVec::::try_from(self.clone().into_inner()) + .map_err(|_| "BoundedVec exceeds its limit".into()) } } -- gitstuff