diff --git a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs index 4b6892d9a1..2848a304f9 100644 --- a/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-kusama/tests/tests.rs @@ -711,10 +711,8 @@ fn treasury_pallet_account_not_none() { #[test] fn location_conversion_works() { - let alice_32 = AccountId32 { - network: None, - id: polkadot_core_primitives::AccountId::from(ALICE).into(), - }; + let alice_32 = + AccountId32 { network: None, id: polkadot_core_primitives::AccountId::from(ALICE).into() }; let bob_20 = AccountKey20 { network: None, key: [123u8; 20] }; // the purpose of hardcoded values is to catch an unintended location conversion logic change. @@ -750,21 +748,12 @@ fn location_conversion_works() { // DescribeAccountId32Terminal TestCase { description: "DescribeAccountId32Terminal Parent", - location: Location::new( - 1, - [alice_32.clone()], - ), + location: Location::new(1, [alice_32.clone()]), expected_account_id_str: "5DN5SGsuUG7PAqFL47J9meViwdnk9AdeSWKFkcHC45hEzVz4", }, TestCase { description: "DescribeAccountId32Terminal Sibling", - location: Location::new( - 1, - [ - Parachain(1111), - alice_32.clone(), - ], - ), + location: Location::new(1, [Parachain(1111), alice_32.clone()]), expected_account_id_str: "5DGRXLYwWGce7wvm14vX1Ms4Vf118FSWQbJkyQigY2pfm6bg", }, // DescribeAccountKey20Terminal @@ -775,10 +764,7 @@ fn location_conversion_works() { }, TestCase { description: "DescribeAccountKey20Terminal Sibling", - location: Location::new( - 1, - [Parachain(1111), bob_20.clone()], - ), + location: Location::new(1, [Parachain(1111), bob_20.clone()]), expected_account_id_str: "5CE6V5AKH8H4rg2aq5KMbvaVUDMumHKVPPQEEDMHPy3GmJQp", }, // DescribeTreasuryVoiceTerminal diff --git a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs index a7e603a02c..4367c81d75 100644 --- a/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs +++ b/system-parachains/asset-hubs/asset-hub-polkadot/tests/tests.rs @@ -735,10 +735,8 @@ fn change_xcm_bridge_hub_ethereum_base_fee_by_governance_works() { #[test] fn location_conversion_works() { - let alice_32 = AccountId32 { - network: None, - id: polkadot_core_primitives::AccountId::from(ALICE).into(), - }; + let alice_32 = + AccountId32 { network: None, id: polkadot_core_primitives::AccountId::from(ALICE).into() }; let bob_20 = AccountKey20 { network: None, key: [123u8; 20] }; // the purpose of hardcoded values is to catch an unintended location conversion logic change. @@ -774,21 +772,12 @@ fn location_conversion_works() { // DescribeAccountId32Terminal TestCase { description: "DescribeAccountId32Terminal Parent", - location: Location::new( - 1, - [alice_32.clone()], - ), + location: Location::new(1, [alice_32.clone()]), expected_account_id_str: "5DN5SGsuUG7PAqFL47J9meViwdnk9AdeSWKFkcHC45hEzVz4", }, TestCase { description: "DescribeAccountId32Terminal Sibling", - location: Location::new( - 1, - [ - Parachain(1111), - alice_32.clone(), - ], - ), + location: Location::new(1, [Parachain(1111), alice_32.clone()]), expected_account_id_str: "5DGRXLYwWGce7wvm14vX1Ms4Vf118FSWQbJkyQigY2pfm6bg", }, // DescribeAccountKey20Terminal @@ -799,10 +788,7 @@ fn location_conversion_works() { }, TestCase { description: "DescribeAccountKey20Terminal Sibling", - location: Location::new( - 1, - [Parachain(1111), bob_20.clone()], - ), + location: Location::new(1, [Parachain(1111), bob_20.clone()]), expected_account_id_str: "5CE6V5AKH8H4rg2aq5KMbvaVUDMumHKVPPQEEDMHPy3GmJQp", }, // DescribeTreasuryVoiceTerminal diff --git a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs index 05223ad35a..7fb41affa3 100644 --- a/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-kusama/tests/tests.rs @@ -411,21 +411,12 @@ fn location_conversion_works() { // DescribeAccountId32Terminal TestCase { description: "DescribeAccountId32Terminal Parent", - location: Location::new( - 1, - [alice_32.clone()], - ), + location: Location::new(1, [alice_32.clone()]), expected_account_id_str: "5EueAXd4h8u75nSbFdDJbC29cmi4Uo1YJssqEL9idvindxFL", }, TestCase { description: "DescribeAccountId32Terminal Sibling", - location: Location::new( - 1, - [ - Parachain(1111), - alice_32.clone(), - ], - ), + location: Location::new(1, [Parachain(1111), alice_32.clone()]), expected_account_id_str: "5Dmbuiq48fU4iW58FKYqoGbbfxFHjbAeGLMtjFg6NNCw3ssr", }, // DescribeAccountKey20Terminal @@ -436,10 +427,7 @@ fn location_conversion_works() { }, TestCase { description: "DescribeAccountKey20Terminal Sibling", - location: Location::new( - 1, - [Parachain(1111), bob_20.clone()], - ), + location: Location::new(1, [Parachain(1111), bob_20.clone()]), expected_account_id_str: "5CE6V5AKH8H4rg2aq5KMbvaVUDMumHKVPPQEEDMHPy3GmJQp", }, // DescribeTreasuryVoiceTerminal diff --git a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs index 18bd832422..291f31af51 100644 --- a/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs +++ b/system-parachains/bridge-hubs/bridge-hub-polkadot/tests/tests.rs @@ -412,21 +412,12 @@ fn location_conversion_works() { // DescribeAccountId32Terminal TestCase { description: "DescribeAccountId32Terminal Parent", - location: Location::new( - 1, - [alice_32.clone()], - ), + location: Location::new(1, [alice_32.clone()]), expected_account_id_str: "5EueAXd4h8u75nSbFdDJbC29cmi4Uo1YJssqEL9idvindxFL", }, TestCase { description: "DescribeAccountId32Terminal Sibling", - location: Location::new( - 1, - [ - Parachain(1111), - alice_32.clone(), - ], - ), + location: Location::new(1, [Parachain(1111), alice_32.clone()]), expected_account_id_str: "5Dmbuiq48fU4iW58FKYqoGbbfxFHjbAeGLMtjFg6NNCw3ssr", }, // DescribeAccountKey20Terminal @@ -437,10 +428,7 @@ fn location_conversion_works() { }, TestCase { description: "DescribeAccountKey20Terminal Sibling", - location: Location::new( - 1, - [Parachain(1111), bob_20.clone()], - ), + location: Location::new(1, [Parachain(1111), bob_20.clone()]), expected_account_id_str: "5CE6V5AKH8H4rg2aq5KMbvaVUDMumHKVPPQEEDMHPy3GmJQp", }, // DescribeTreasuryVoiceTerminal diff --git a/system-parachains/collectives/collectives-polkadot/tests/location_conversion.rs b/system-parachains/collectives/collectives-polkadot/tests/location_conversion.rs index 1f3d7d3710..cb8e63dbbb 100644 --- a/system-parachains/collectives/collectives-polkadot/tests/location_conversion.rs +++ b/system-parachains/collectives/collectives-polkadot/tests/location_conversion.rs @@ -24,10 +24,7 @@ const ALICE: [u8; 32] = [1u8; 32]; #[test] fn location_conversion_works() { - let alice_32 = AccountId32 { - network: None, - id: AccountId::from(ALICE).into(), - }; + let alice_32 = AccountId32 { network: None, id: AccountId::from(ALICE).into() }; let bob_20 = AccountKey20 { network: None, key: [123u8; 20] }; // the purpose of hardcoded values is to catch an unintended location conversion logic change. @@ -63,21 +60,12 @@ fn location_conversion_works() { // DescribeAccountId32Terminal TestCase { description: "DescribeAccountId32Terminal Parent", - location: Location::new( - 1, - [alice_32.clone()], - ), + location: Location::new(1, [alice_32.clone()]), expected_account_id_str: "5DN5SGsuUG7PAqFL47J9meViwdnk9AdeSWKFkcHC45hEzVz4", }, TestCase { description: "DescribeAccountId32Terminal Sibling", - location: Location::new( - 1, - [ - Parachain(1111), - alice_32.clone(), - ], - ), + location: Location::new(1, [Parachain(1111), alice_32.clone()]), expected_account_id_str: "5DGRXLYwWGce7wvm14vX1Ms4Vf118FSWQbJkyQigY2pfm6bg", }, // DescribeAccountKey20Terminal @@ -88,10 +76,7 @@ fn location_conversion_works() { }, TestCase { description: "DescribeAccountKey20Terminal Sibling", - location: Location::new( - 1, - [Parachain(1111), bob_20.clone()], - ), + location: Location::new(1, [Parachain(1111), bob_20.clone()]), expected_account_id_str: "5CE6V5AKH8H4rg2aq5KMbvaVUDMumHKVPPQEEDMHPy3GmJQp", }, // DescribeTreasuryVoiceTerminal diff --git a/system-parachains/coretime/coretime-kusama/src/tests.rs b/system-parachains/coretime/coretime-kusama/src/tests.rs index e03098006b..a0096c97f9 100644 --- a/system-parachains/coretime/coretime-kusama/src/tests.rs +++ b/system-parachains/coretime/coretime-kusama/src/tests.rs @@ -116,10 +116,8 @@ fn timeslice_period_is_sane() { #[test] fn location_conversion_works() { - let alice_32 = AccountId32 { - network: None, - id: polkadot_core_primitives::AccountId::from(ALICE).into(), - }; + let alice_32 = + AccountId32 { network: None, id: polkadot_core_primitives::AccountId::from(ALICE).into() }; let bob_20 = AccountKey20 { network: None, key: [123u8; 20] }; // the purpose of hardcoded values is to catch an unintended location conversion logic change. @@ -155,21 +153,12 @@ fn location_conversion_works() { // DescribeAccountId32Terminal TestCase { description: "DescribeAccountId32Terminal Parent", - location: Location::new( - 1, - [alice_32.clone()], - ), + location: Location::new(1, [alice_32.clone()]), expected_account_id_str: "5DN5SGsuUG7PAqFL47J9meViwdnk9AdeSWKFkcHC45hEzVz4", }, TestCase { description: "DescribeAccountId32Terminal Sibling", - location: Location::new( - 1, - [ - Parachain(1111), - alice_32.clone(), - ], - ), + location: Location::new(1, [Parachain(1111), alice_32.clone()]), expected_account_id_str: "5DGRXLYwWGce7wvm14vX1Ms4Vf118FSWQbJkyQigY2pfm6bg", }, // DescribeAccountKey20Terminal @@ -180,10 +169,7 @@ fn location_conversion_works() { }, TestCase { description: "DescribeAccountKey20Terminal Sibling", - location: Location::new( - 1, - [Parachain(1111), bob_20.clone()], - ), + location: Location::new(1, [Parachain(1111), bob_20.clone()]), expected_account_id_str: "5CE6V5AKH8H4rg2aq5KMbvaVUDMumHKVPPQEEDMHPy3GmJQp", }, // DescribeTreasuryVoiceTerminal diff --git a/system-parachains/coretime/coretime-polkadot/src/tests.rs b/system-parachains/coretime/coretime-polkadot/src/tests.rs index bfea18ef9b..e18581ae10 100644 --- a/system-parachains/coretime/coretime-polkadot/src/tests.rs +++ b/system-parachains/coretime/coretime-polkadot/src/tests.rs @@ -116,10 +116,8 @@ fn timeslice_period_is_sane() { #[test] fn location_conversion_works() { - let alice_32 = AccountId32 { - network: None, - id: polkadot_core_primitives::AccountId::from(ALICE).into(), - }; + let alice_32 = + AccountId32 { network: None, id: polkadot_core_primitives::AccountId::from(ALICE).into() }; let bob_20 = AccountKey20 { network: None, key: [123u8; 20] }; // the purpose of hardcoded values is to catch an unintended location conversion logic change. @@ -155,21 +153,12 @@ fn location_conversion_works() { // DescribeAccountId32Terminal TestCase { description: "DescribeAccountId32Terminal Parent", - location: Location::new( - 1, - [alice_32.clone()], - ), + location: Location::new(1, [alice_32.clone()]), expected_account_id_str: "5DN5SGsuUG7PAqFL47J9meViwdnk9AdeSWKFkcHC45hEzVz4", }, TestCase { description: "DescribeAccountId32Terminal Sibling", - location: Location::new( - 1, - [ - Parachain(1111), - alice_32.clone(), - ], - ), + location: Location::new(1, [Parachain(1111), alice_32.clone()]), expected_account_id_str: "5DGRXLYwWGce7wvm14vX1Ms4Vf118FSWQbJkyQigY2pfm6bg", }, // DescribeAccountKey20Terminal @@ -180,10 +169,7 @@ fn location_conversion_works() { }, TestCase { description: "DescribeAccountKey20Terminal Sibling", - location: Location::new( - 1, - [Parachain(1111), bob_20.clone()], - ), + location: Location::new(1, [Parachain(1111), bob_20.clone()]), expected_account_id_str: "5CE6V5AKH8H4rg2aq5KMbvaVUDMumHKVPPQEEDMHPy3GmJQp", }, // DescribeTreasuryVoiceTerminal diff --git a/system-parachains/people/people-kusama/src/tests.rs b/system-parachains/people/people-kusama/src/tests.rs index a4849a28ed..2ad2d9e2ad 100644 --- a/system-parachains/people/people-kusama/src/tests.rs +++ b/system-parachains/people/people-kusama/src/tests.rs @@ -24,10 +24,7 @@ const ALICE: [u8; 32] = [1u8; 32]; #[test] fn location_conversion_works() { - let alice_32 = AccountId32 { - network: None, - id: AccountId::from(ALICE).into(), - }; + let alice_32 = AccountId32 { network: None, id: AccountId::from(ALICE).into() }; let bob_20 = AccountKey20 { network: None, key: [123u8; 20] }; // the purpose of hardcoded values is to catch an unintended location conversion logic change. @@ -63,21 +60,12 @@ fn location_conversion_works() { // DescribeAccountId32Terminal TestCase { description: "DescribeAccountId32Terminal Parent", - location: Location::new( - 1, - [alice_32.clone()], - ), + location: Location::new(1, [alice_32.clone()]), expected_account_id_str: "5DN5SGsuUG7PAqFL47J9meViwdnk9AdeSWKFkcHC45hEzVz4", }, TestCase { description: "DescribeAccountId32Terminal Sibling", - location: Location::new( - 1, - [ - Parachain(1111), - alice_32.clone(), - ], - ), + location: Location::new(1, [Parachain(1111), alice_32.clone()]), expected_account_id_str: "5DGRXLYwWGce7wvm14vX1Ms4Vf118FSWQbJkyQigY2pfm6bg", }, // DescribeAccountKey20Terminal @@ -88,10 +76,7 @@ fn location_conversion_works() { }, TestCase { description: "DescribeAccountKey20Terminal Sibling", - location: Location::new( - 1, - [Parachain(1111), bob_20.clone()], - ), + location: Location::new(1, [Parachain(1111), bob_20.clone()]), expected_account_id_str: "5CE6V5AKH8H4rg2aq5KMbvaVUDMumHKVPPQEEDMHPy3GmJQp", }, // DescribeTreasuryVoiceTerminal diff --git a/system-parachains/people/people-polkadot/src/tests.rs b/system-parachains/people/people-polkadot/src/tests.rs index 547f338ade..e060145dbe 100644 --- a/system-parachains/people/people-polkadot/src/tests.rs +++ b/system-parachains/people/people-polkadot/src/tests.rs @@ -24,10 +24,7 @@ const ALICE: [u8; 32] = [1u8; 32]; #[test] fn location_conversion_works() { - let alice_32 = AccountId32 { - network: None, - id: AccountId::from(ALICE).into(), - }; + let alice_32 = AccountId32 { network: None, id: AccountId::from(ALICE).into() }; let bob_20 = AccountKey20 { network: None, key: [123u8; 20] }; // the purpose of hardcoded values is to catch an unintended location conversion logic change. @@ -63,21 +60,12 @@ fn location_conversion_works() { // DescribeAccountId32Terminal TestCase { description: "DescribeAccountId32Terminal Parent", - location: Location::new( - 1, - [alice_32.clone()], - ), + location: Location::new(1, [alice_32.clone()]), expected_account_id_str: "5DN5SGsuUG7PAqFL47J9meViwdnk9AdeSWKFkcHC45hEzVz4", }, TestCase { description: "DescribeAccountId32Terminal Sibling", - location: Location::new( - 1, - [ - Parachain(1111), - alice_32.clone(), - ], - ), + location: Location::new(1, [Parachain(1111), alice_32.clone()]), expected_account_id_str: "5DGRXLYwWGce7wvm14vX1Ms4Vf118FSWQbJkyQigY2pfm6bg", }, // DescribeAccountKey20Terminal @@ -88,10 +76,7 @@ fn location_conversion_works() { }, TestCase { description: "DescribeAccountKey20Terminal Sibling", - location: Location::new( - 1, - [Parachain(1111), bob_20.clone()], - ), + location: Location::new(1, [Parachain(1111), bob_20.clone()]), expected_account_id_str: "5CE6V5AKH8H4rg2aq5KMbvaVUDMumHKVPPQEEDMHPy3GmJQp", }, // DescribeTreasuryVoiceTerminal