diff --git a/polkadot/xcm/xcm-builder/src/tests/barriers.rs b/polkadot/xcm/xcm-builder/src/tests/barriers.rs index 9fcb1841dc15..ad5d45bae6da 100644 --- a/polkadot/xcm/xcm-builder/src/tests/barriers.rs +++ b/polkadot/xcm/xcm-builder/src/tests/barriers.rs @@ -709,8 +709,6 @@ fn deny_then_try_works() { #[test] fn recursive_deny_and_try_xcm_works() { - use crate::barriers::RecursiveDenyThenTry; - frame_support::__private::sp_tracing::try_init_simple(); type Barrier = RecursiveDenyThenTry; @@ -826,36 +824,36 @@ fn deny_reserve_transfer_to_relaychain_should_work() { assert_deny_execution(vec![ClearOrigin], Here.into_location(), Ok(())); } -#[test] -fn deny_instructions_with_xcm_works() { - impl ShouldExecute for DenyInstructionsWithXcm { - fn should_execute( - origin: &Location, - instructions: &mut [Instruction], - max_weight: Weight, - properties: &mut Properties, - ) -> Result<(), ProcessMessageError> { - Self::deny_execution(origin, instructions, max_weight, properties) - } +impl ShouldExecute for DenyInstructionsWithXcm { + fn should_execute( + origin: &Location, + instructions: &mut [Instruction], + max_weight: Weight, + properties: &mut Properties, + ) -> Result<(), ProcessMessageError> { + Self::deny_execution(origin, instructions, max_weight, properties) } +} +#[test] +fn deny_instructions_with_xcm_works() { type Barrier = DenyInstructionsWithXcm; assert_deny_nested_instructions_with_xcm::(Ok(())); } -#[test] -fn deny_first_instructions_with_xcm_works() { - impl ShouldExecute for DenyFirstInstructionsWithXcm { - fn should_execute( - origin: &Location, - instructions: &mut [Instruction], - max_weight: Weight, - properties: &mut Properties, - ) -> Result<(), ProcessMessageError> { - Self::deny_execution(origin, instructions, max_weight, properties) - } +impl ShouldExecute for DenyFirstInstructionsWithXcm { + fn should_execute( + origin: &Location, + instructions: &mut [Instruction], + max_weight: Weight, + properties: &mut Properties, + ) -> Result<(), ProcessMessageError> { + Self::deny_execution(origin, instructions, max_weight, properties) } +} +#[test] +fn deny_first_instructions_with_xcm_works() { type Barrier = DenyFirstInstructionsWithXcm; assert_deny_nested_instructions_with_xcm::(Err(ProcessMessageError::Unsupported)); }