git.delta.rocks / unique-network / refs/commits / 761b2c7920ca

difftreelog

cargo fmt

Daniel Shiposha2022-05-06parent: #4154c51.patch.diff
in: master

4 files changed

modifiedpallets/common/src/lib.rsdiffbeforeafterboth
--- a/pallets/common/src/lib.rs
+++ b/pallets/common/src/lib.rs
@@ -844,30 +844,31 @@
 		Ok(())
 	}
 
-	pub fn bytes_keys_to_property_keys(keys: Vec<Vec<u8>>) -> Result<Vec<PropertyKey>, DispatchError> {
+	pub fn bytes_keys_to_property_keys(
+		keys: Vec<Vec<u8>>,
+	) -> Result<Vec<PropertyKey>, DispatchError> {
 		keys.into_iter()
 			.map(|key| -> Result<PropertyKey, DispatchError> {
 				// TODO Fix error
-				key.try_into().map_err(|_| DispatchError::Other("Can't read property key"))
+				key.try_into()
+					.map_err(|_| DispatchError::Other("Can't read property key"))
 			})
 			.collect::<Result<Vec<PropertyKey>, DispatchError>>()
 	}
 
 	pub fn filter_collection_properties(
 		collection_id: CollectionId,
-		keys: Vec<PropertyKey>
+		keys: Vec<PropertyKey>,
 	) -> Result<Vec<Property>, DispatchError> {
 		let properties = Self::collection_properties(collection_id);
 
-		let properties = keys.into_iter()
+		let properties = keys
+			.into_iter()
 			.filter_map(|key| {
-				properties.get_property(&key)
-					.map(|value| {
-						Property {
-							key,
-							value: value.clone()
-						}
-					})
+				properties.get_property(&key).map(|value| Property {
+					key,
+					value: value.clone(),
+				})
 			})
 			.collect();
 
@@ -876,18 +877,18 @@
 
 	pub fn filter_property_permissions(
 		collection_id: CollectionId,
-		keys: Vec<PropertyKey>
+		keys: Vec<PropertyKey>,
 	) -> Result<Vec<PropertyKeyPermission>, DispatchError> {
 		let permissions = Self::property_permissions(collection_id);
 
-		let key_permissions = keys.into_iter()
+		let key_permissions = keys
+			.into_iter()
 			.filter_map(|key| {
-				permissions.get(&key)
-					.map(|permission| {
-						PropertyKeyPermission {
-							key,
-							permission: permission.clone()
-						}
+				permissions
+					.get(&key)
+					.map(|permission| PropertyKeyPermission {
+						key,
+						permission: permission.clone(),
 					})
 			})
 			.collect();
@@ -1169,11 +1170,7 @@
 	fn token_owner(&self, token: TokenId) -> Option<T::CrossAccountId>;
 	fn const_metadata(&self, token: TokenId) -> Vec<u8>;
 	fn variable_metadata(&self, token: TokenId) -> Vec<u8>;
-	fn token_properties(
-		&self,
-		token_id: TokenId,
-		keys: Vec<PropertyKey>
-	) -> Vec<Property>;
+	fn token_properties(&self, token_id: TokenId, keys: Vec<PropertyKey>) -> Vec<Property>;
 	/// Amount of unique collection tokens
 	fn total_supply(&self) -> u32;
 	/// Amount of different tokens account has (Applicable to nonfungible/refungible)
modifiedpallets/fungible/src/common.rsdiffbeforeafterboth
--- a/pallets/fungible/src/common.rs
+++ b/pallets/fungible/src/common.rs
@@ -336,11 +336,7 @@
 		Vec::new()
 	}
 
-	fn token_properties(
-		&self,
-		_token_id: TokenId,
-		_keys: Vec<PropertyKey>
-	) -> Vec<Property> {
+	fn token_properties(&self, _token_id: TokenId, _keys: Vec<PropertyKey>) -> Vec<Property> {
 		Vec::new()
 	}
 
modifiedpallets/nonfungible/src/common.rsdiffbeforeafterboth
396 keys.into_iter()392 keys.into_iter()
397 .filter_map(|key| {393 .filter_map(|key| {
398 properties.get_property(&key)394 properties.get_property(&key).map(|value| Property {
399 .map(|value| {
400 Property {
401 key,395 key,
402 value: value.clone()396 value: value.clone(),
403 }397 })
404 })
405 })398 })
406 .collect()399 .collect()
407 }400 }
modifiedpallets/refungible/src/common.rsdiffbeforeafterboth
--- a/pallets/refungible/src/common.rs
+++ b/pallets/refungible/src/common.rs
@@ -363,11 +363,7 @@
 			.into_inner()
 	}
 
-	fn token_properties(
-		&self,
-		_token_id: TokenId,
-		_keys: Vec<PropertyKey>
-	) -> Vec<Property> {
+	fn token_properties(&self, _token_id: TokenId, _keys: Vec<PropertyKey>) -> Vec<Property> {
 		Vec::new()
 	}