style: Migrate to stable-only rustfmt configuration

- Remove nightly-only features from .rustfmt.toml and vendor/ss58-registry/rustfmt.toml
- Removed features: imports_granularity, wrap_comments, comment_width,
  reorder_impl_items, spaces_around_ranges, binop_separator,
  match_arm_blocks, trailing_semicolon, trailing_comma
- Format all 898 affected files with stable rustfmt
- Ensures long-term reliability without nightly toolchain dependency
This commit is contained in:
2025-12-22 17:12:58 +03:00
parent 65b7f5e640
commit 4c8f281051
898 changed files with 8671 additions and 6432 deletions
@@ -73,8 +73,9 @@ pub(crate) fn assert_matches_reserve_asset_deposited_instructions<RuntimeCall: D
})
.expect("expected instruction BuyExecution")
.match_next_inst(|instr| match instr {
DepositAsset { assets: _, beneficiary } if beneficiary == expected_beneficiary =>
Ok(()),
DepositAsset { assets: _, beneficiary } if beneficiary == expected_beneficiary => {
Ok(())
},
_ => Err(ProcessMessageError::BadFormat),
})
.expect("expected instruction DepositAsset");
@@ -615,9 +615,9 @@ pub fn teleports_for_foreign_assets_works<
);
let asset_to_teleport_away = asset_minimum_asset_balance * 3;
assert!(
asset_to_teleport_away <
(target_account_balance_before_teleport -
asset_minimum_asset_balance.into())
asset_to_teleport_away
< (target_account_balance_before_teleport
- asset_minimum_asset_balance.into())
.into()
);
@@ -1190,12 +1190,12 @@ pub fn create_and_manage_foreign_assets_for_local_consensus_teyrchain_assets_wor
.with_session_keys(collator_session_keys.session_keys())
.with_balances(vec![(
foreign_creator_as_account_id.clone(),
existential_deposit +
asset_deposit +
metadata_deposit_base +
metadata_deposit_per_byte_eta +
buy_execution_fee_amount.into() +
buy_execution_fee_amount.into(),
existential_deposit
+ asset_deposit
+ metadata_deposit_base
+ metadata_deposit_per_byte_eta
+ buy_execution_fee_amount.into()
+ buy_execution_fee_amount.into(),
)])
.with_tracing()
.build()
@@ -1209,11 +1209,11 @@ pub fn create_and_manage_foreign_assets_for_local_consensus_teyrchain_assets_wor
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(
&foreign_creator_as_account_id
),
existential_deposit +
asset_deposit + metadata_deposit_base +
metadata_deposit_per_byte_eta +
buy_execution_fee_amount.into() +
buy_execution_fee_amount.into()
existential_deposit
+ asset_deposit + metadata_deposit_base
+ metadata_deposit_per_byte_eta
+ buy_execution_fee_amount.into()
+ buy_execution_fee_amount.into()
);
additional_checks_before();
@@ -1549,9 +1549,9 @@ pub fn reserve_transfer_native_asset_to_non_teleport_para_works<
// then verify the arithmetics check out on final balance.
let delivery_fees_buffer = 40_000_000_000u128;
// drip 2xED + transfer_amount + delivery_fees_buffer to Alice account
let alice_account_init_balance = existential_deposit.saturating_mul(2.into()) +
balance_to_transfer.into() +
delivery_fees_buffer.into();
let alice_account_init_balance = existential_deposit.saturating_mul(2.into())
+ balance_to_transfer.into()
+ delivery_fees_buffer.into();
let _ = <pezpallet_balances::Pezpallet<Runtime>>::deposit_creating(
&alice_account,
alice_account_init_balance,
@@ -1565,9 +1565,9 @@ pub fn reserve_transfer_native_asset_to_non_teleport_para_works<
// we just check here, that user retains enough balance after withdrawal
// and also we check if `balance_to_transfer` is more than `existential_deposit`,
assert!(
(<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&alice_account) -
balance_to_transfer.into()) >=
existential_deposit
(<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&alice_account)
- balance_to_transfer.into())
>= existential_deposit
);
// SA has just ED
assert_eq!(
@@ -1609,8 +1609,9 @@ pub fn reserve_transfer_native_asset_to_non_teleport_para_works<
.into_iter()
.filter_map(|e| unwrap_xcmp_queue_event(e.event.encode()))
.find_map(|e| match e {
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { message_hash } =>
Some(message_hash),
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { message_hash } => {
Some(message_hash)
},
_ => None,
});
@@ -153,9 +153,9 @@ pub fn limited_reserve_transfer_assets_for_native_asset_works<
// we just check here, that user retains enough balance after withdrawal
// and also we check if `balance_to_transfer` is more than `existential_deposit`,
assert!(
(<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&alice_account) -
balance_to_transfer.into()) >=
existential_deposit
(<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&alice_account)
- balance_to_transfer.into())
>= existential_deposit
);
// SA has just ED
assert_eq!(
@@ -220,8 +220,9 @@ pub fn limited_reserve_transfer_assets_for_native_asset_works<
.into_iter()
.filter_map(|e| unwrap_xcmp_queue_event(e.event.encode()))
.find_map(|e| match e {
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { message_hash } =>
Some(message_hash),
pezcumulus_pezpallet_xcmp_queue::Event::XcmpMessageSent { message_hash } => {
Some(message_hash)
},
_ => None,
});
@@ -268,7 +269,9 @@ pub fn limited_reserve_transfer_assets_for_native_asset_works<
// explicit unpaid execution on BridgeHub)
UnpaidExecution { weight_limit, check_origin }
if weight_limit == &Unlimited && check_origin.is_none() =>
Ok(()),
{
Ok(())
},
_ => Err(ProcessMessageError::BadFormat),
})
.expect("contains UnpaidExecution")
@@ -322,8 +325,8 @@ pub fn limited_reserve_transfer_assets_for_native_asset_works<
let delivery_fees_account_balance_after =
<pezpallet_balances::Pezpallet<Runtime>>::free_balance(&delivery_fees_account);
assert!(
delivery_fees_account_balance_after - delivery_fees.into() >=
delivery_fees_account_balance_before
delivery_fees_account_balance_after - delivery_fees.into()
>= delivery_fees_account_balance_before
);
}
})