From 247c0b0762fa660fcd058780ab8eb2deeee95005 Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Mon, 29 Aug 2022 16:54:49 +0000 Subject: [PATCH] fix(build): use default-members instead of exclude --- --- a/Cargo.toml +++ b/Cargo.toml @@ -6,9 +6,12 @@ 'client/*', 'primitives/*', 'crates/*', + 'runtime/opal', + 'runtime/quartz', + 'runtime/unique', 'runtime/tests', ] -exclude = ["runtime/unique", "runtime/quartz"] +default-members = ['node/*', 'runtime/opal'] [profile.release] panic = 'unwind' --- a/runtime/common/config/xcm.rs +++ b/runtime/common/config/xcm.rs @@ -33,8 +33,7 @@ use xcm::latest::{ AssetId::{Concrete}, Fungibility::Fungible as XcmFungible, - MultiAsset, Error as XcmError, - Instruction, Xcm, + MultiAsset, Error as XcmError, Instruction, Xcm, }; use xcm_builder::{ AccountId32Aliases, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, @@ -181,7 +180,9 @@ _max_weight: Weight, _weight_credit: &mut Weight, ) -> Result<(), ()> { - let transact_inst = message.0.iter() + let transact_inst = message + .0 + .iter() .find(|inst| matches![inst, Instruction::Transact { .. }]); match transact_inst { @@ -192,8 +193,8 @@ ); Err(()) - }, - None => Ok(()) + } + None => Ok(()), } } } @@ -201,24 +202,24 @@ /// Deny executing the XCM if it matches any of the Deny filter regardless of anything else. /// If it passes the Deny, and matches one of the Allow cases then it is let through. pub struct DenyThenTry(PhantomData, PhantomData) - where - Deny: ShouldExecute, - Allow: ShouldExecute; +where + Deny: ShouldExecute, + Allow: ShouldExecute; impl ShouldExecute for DenyThenTry - where - Deny: ShouldExecute, - Allow: ShouldExecute, +where + Deny: ShouldExecute, + Allow: ShouldExecute, { - fn should_execute( - origin: &MultiLocation, - message: &mut Xcm, - max_weight: Weight, - weight_credit: &mut Weight, - ) -> Result<(), ()> { - Deny::should_execute(origin, message, max_weight, weight_credit)?; - Allow::should_execute(origin, message, max_weight, weight_credit) - } + fn should_execute( + origin: &MultiLocation, + message: &mut Xcm, + max_weight: Weight, + weight_credit: &mut Weight, + ) -> Result<(), ()> { + Deny::should_execute(origin, message, max_weight, weight_credit)?; + Allow::should_execute(origin, message, max_weight, weight_credit) + } } pub struct UsingOnlySelfCurrencyComponents< -- gitstuff