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
@@ -352,8 +352,9 @@ where
_result: &DispatchResult,
) -> Result<Weight, TransactionValidityError> {
let (tip, who, initial_payment, extension_weight) = match pre {
Pre::Charge { tip, who, initial_payment, weight } =>
(tip, who, initial_payment, weight),
Pre::Charge { tip, who, initial_payment, weight } => {
(tip, who, initial_payment, weight)
},
Pre::NoCharge { refund } => {
// No-op: Refund everything
return Ok(refund);
@@ -184,15 +184,16 @@ where
if asset_id == A::get() {
// The `asset_id` is the target asset, we do not need to swap.
match F::can_withdraw(asset_id.clone(), who, fee) {
WithdrawConsequence::BalanceLow |
WithdrawConsequence::UnknownAsset |
WithdrawConsequence::Underflow |
WithdrawConsequence::Overflow |
WithdrawConsequence::Frozen =>
return Err(TransactionValidityError::from(InvalidTransaction::Payment)),
WithdrawConsequence::Success |
WithdrawConsequence::ReducedToZero(_) |
WithdrawConsequence::WouldDie => return Ok(()),
WithdrawConsequence::BalanceLow
| WithdrawConsequence::UnknownAsset
| WithdrawConsequence::Underflow
| WithdrawConsequence::Overflow
| WithdrawConsequence::Frozen => {
return Err(TransactionValidityError::from(InvalidTransaction::Payment))
},
WithdrawConsequence::Success
| WithdrawConsequence::ReducedToZero(_)
| WithdrawConsequence::WouldDie => return Ok(()),
}
}
@@ -202,15 +203,16 @@ where
// Ensure we can withdraw enough `asset_id` for the swap.
match F::can_withdraw(asset_id.clone(), who, asset_fee) {
WithdrawConsequence::BalanceLow |
WithdrawConsequence::UnknownAsset |
WithdrawConsequence::Underflow |
WithdrawConsequence::Overflow |
WithdrawConsequence::Frozen =>
return Err(TransactionValidityError::from(InvalidTransaction::Payment)),
WithdrawConsequence::Success |
WithdrawConsequence::ReducedToZero(_) |
WithdrawConsequence::WouldDie => {},
WithdrawConsequence::BalanceLow
| WithdrawConsequence::UnknownAsset
| WithdrawConsequence::Underflow
| WithdrawConsequence::Overflow
| WithdrawConsequence::Frozen => {
return Err(TransactionValidityError::from(InvalidTransaction::Payment))
},
WithdrawConsequence::Success
| WithdrawConsequence::ReducedToZero(_)
| WithdrawConsequence::WouldDie => {},
};
Ok(())
@@ -227,8 +229,8 @@ where
) -> Result<BalanceOf<T>, TransactionValidityError> {
let (fee_paid, initial_asset_consumed) = already_withdrawn;
let refund_amount = fee_paid.peek().saturating_sub(corrected_fee);
let (fee_in_asset, adjusted_paid) = if refund_amount.is_zero() ||
F::total_balance(asset_id.clone(), who).is_zero()
let (fee_in_asset, adjusted_paid) = if refund_amount.is_zero()
|| F::total_balance(asset_id.clone(), who).is_zero()
{
// Nothing to refund or the account was removed be the dispatched function.
(initial_asset_consumed, fee_paid)