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:
@@ -194,16 +194,20 @@ impl Diff {
|
||||
info.storage_items =
|
||||
info.storage_items.saturating_add(items_added).saturating_sub(items_removed);
|
||||
match &bytes_deposit {
|
||||
Deposit::Charge(amount) =>
|
||||
info.storage_byte_deposit = info.storage_byte_deposit.saturating_add(*amount),
|
||||
Deposit::Refund(amount) =>
|
||||
info.storage_byte_deposit = info.storage_byte_deposit.saturating_sub(*amount),
|
||||
Deposit::Charge(amount) => {
|
||||
info.storage_byte_deposit = info.storage_byte_deposit.saturating_add(*amount)
|
||||
},
|
||||
Deposit::Refund(amount) => {
|
||||
info.storage_byte_deposit = info.storage_byte_deposit.saturating_sub(*amount)
|
||||
},
|
||||
}
|
||||
match &items_deposit {
|
||||
Deposit::Charge(amount) =>
|
||||
info.storage_item_deposit = info.storage_item_deposit.saturating_add(*amount),
|
||||
Deposit::Refund(amount) =>
|
||||
info.storage_item_deposit = info.storage_item_deposit.saturating_sub(*amount),
|
||||
Deposit::Charge(amount) => {
|
||||
info.storage_item_deposit = info.storage_item_deposit.saturating_add(*amount)
|
||||
},
|
||||
Deposit::Refund(amount) => {
|
||||
info.storage_item_deposit = info.storage_item_deposit.saturating_sub(*amount)
|
||||
},
|
||||
}
|
||||
|
||||
bytes_deposit.saturating_add(&items_deposit)
|
||||
@@ -265,8 +269,9 @@ impl<T: Config> Contribution<T> {
|
||||
fn update_contract(&self, info: Option<&mut ContractInfo<T>>) -> DepositOf<T> {
|
||||
match self {
|
||||
Self::Alive(diff) => diff.update_contract::<T>(info),
|
||||
Self::Terminated { deposit, beneficiary: _ } | Self::Checked(deposit) =>
|
||||
deposit.clone(),
|
||||
Self::Terminated { deposit, beneficiary: _ } | Self::Checked(deposit) => {
|
||||
deposit.clone()
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -346,8 +351,9 @@ where
|
||||
/// Returns the state of the currently executed contract.
|
||||
fn contract_state(&self) -> ContractState<T> {
|
||||
match &self.own_contribution {
|
||||
Contribution::Terminated { deposit: _, beneficiary } =>
|
||||
ContractState::Terminated { beneficiary: beneficiary.clone() },
|
||||
Contribution::Terminated { deposit: _, beneficiary } => {
|
||||
ContractState::Terminated { beneficiary: beneficiary.clone() }
|
||||
},
|
||||
_ => ContractState::Alive,
|
||||
}
|
||||
}
|
||||
@@ -524,8 +530,8 @@ impl<T: Config> Ext<T> for ReservingExt {
|
||||
let default = max.min(T::DefaultDepositLimit::get());
|
||||
let limit = limit.unwrap_or(default);
|
||||
ensure!(
|
||||
limit <= max &&
|
||||
matches!(T::Currency::can_withdraw(origin, limit), WithdrawConsequence::Success),
|
||||
limit <= max
|
||||
&& matches!(T::Currency::can_withdraw(origin, limit), WithdrawConsequence::Success),
|
||||
<Error<T>>::StorageDepositNotEnoughFunds,
|
||||
);
|
||||
Ok(limit)
|
||||
|
||||
Reference in New Issue
Block a user