git.delta.rocks / unique-network / refs/commits / 55c059c03e4f

difftreelog

Cargo fmt

Trubnikov Sergey2022-06-07parent: #3b810a7.patch.diff
in: master

3 files changed

modifiedpallets/common/src/erc.rsdiffbeforeafterboth
49#[solidity_interface(name = "Collection")]49#[solidity_interface(name = "Collection")]
50impl<T: Config> CollectionHandle<T>50impl<T: Config> CollectionHandle<T>
51where51where
52 T::AccountId: From<[u8; 32]>52 T::AccountId: From<[u8; 32]>,
53{53{
54 fn set_collection_property(&mut self, caller: caller, key: string, value: bytes) -> Result<()> {54 fn set_collection_property(&mut self, caller: caller, key: string, value: bytes) -> Result<()> {
55 let caller = T::CrossAccountId::from_eth(caller);55 let caller = T::CrossAccountId::from_eth(caller);
233 true => {234 true => {
234 let mut bv = OwnerRestrictedSet::new();235 let mut bv = OwnerRestrictedSet::new();
235 for i in collections {236 for i in collections {
236 bv.try_insert(crate::eth::map_eth_to_id(&i).ok_or_else(|| Error::Revert(237 bv.try_insert(crate::eth::map_eth_to_id(&i).ok_or_else(|| {
237 "Can't convert address into collection id".into(),238 Error::Revert("Can't convert address into collection id".into())
238 ))?)239 })?)
239 .map_err(|e| Error::Revert(format!("{:?}", e)))?;240 .map_err(|e| Error::Revert(format!("{:?}", e)))?;
240 }241 }
241 NestingRule::OwnerRestricted (bv)242 NestingRule::OwnerRestricted (bv)
modifiedpallets/fungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/fungible/src/erc.rs
+++ b/pallets/fungible/src/erc.rs
@@ -152,17 +152,14 @@
 		via("CollectionHandle<T>", common_mut, Collection)
 	)
 )]
-impl<T: Config> FungibleHandle<T>
-where
-	T::AccountId: From<[u8; 32]>
-{}
+impl<T: Config> FungibleHandle<T> where T::AccountId: From<[u8; 32]> {}
 
 generate_stubgen!(gen_impl, UniqueFungibleCall<()>, true);
 generate_stubgen!(gen_iface, UniqueFungibleCall<()>, false);
 
 impl<T: Config> CommonEvmHandler for FungibleHandle<T>
 where
-	T::AccountId: From<[u8; 32]>
+	T::AccountId: From<[u8; 32]>,
 {
 	const CODE: &'static [u8] = include_bytes!("./stubs/UniqueFungible.raw");
 
modifiedpallets/nonfungible/src/erc.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/erc.rs
+++ b/pallets/nonfungible/src/erc.rs
@@ -583,10 +583,7 @@
 		TokenProperties,
 	)
 )]
-impl<T: Config> NonfungibleHandle<T>
-where
-	T::AccountId: From<[u8; 32]>
-{}
+impl<T: Config> NonfungibleHandle<T> where T::AccountId: From<[u8; 32]> {}
 
 // Not a tests, but code generators
 generate_stubgen!(gen_impl, UniqueNFTCall<()>, true);
@@ -594,7 +591,7 @@
 
 impl<T: Config> CommonEvmHandler for NonfungibleHandle<T>
 where
-	T::AccountId: From<[u8; 32]>
+	T::AccountId: From<[u8; 32]>,
 {
 	const CODE: &'static [u8] = include_bytes!("./stubs/UniqueNFT.raw");