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 3208f208c0
commit abc4c3989b
898 changed files with 8671 additions and 6432 deletions
+29 -24
View File
@@ -221,9 +221,9 @@ impl ParaLifecycle {
pub fn is_teyrchain(&self) -> bool {
matches!(
self,
ParaLifecycle::Teyrchain |
ParaLifecycle::DowngradingTeyrchain |
ParaLifecycle::OffboardingTeyrchain
ParaLifecycle::Teyrchain
| ParaLifecycle::DowngradingTeyrchain
| ParaLifecycle::OffboardingTeyrchain
)
}
@@ -233,9 +233,9 @@ impl ParaLifecycle {
pub fn is_parathread(&self) -> bool {
matches!(
self,
ParaLifecycle::Parathread |
ParaLifecycle::UpgradingParathread |
ParaLifecycle::OffboardingParathread
ParaLifecycle::Parathread
| ParaLifecycle::UpgradingParathread
| ParaLifecycle::OffboardingParathread
)
}
@@ -1385,8 +1385,9 @@ pub mod pezpallet {
let validators = shared::ActiveValidatorKeys::<T>::get();
let validator_public = match validators.get(validator_index) {
Some(pk) => pk,
None =>
return InvalidTransaction::Custom(INVALID_TX_BAD_VALIDATOR_IDX).into(),
None => {
return InvalidTransaction::Custom(INVALID_TX_BAD_VALIDATOR_IDX).into()
},
};
let signing_payload = stmt.signing_payload();
@@ -1401,10 +1402,12 @@ pub mod pezpallet {
match active_vote.has_vote(validator_index) {
Some(false) => (),
Some(true) =>
return InvalidTransaction::Custom(INVALID_TX_DOUBLE_VOTE).into(),
None =>
return InvalidTransaction::Custom(INVALID_TX_BAD_VALIDATOR_IDX).into(),
Some(true) => {
return InvalidTransaction::Custom(INVALID_TX_DOUBLE_VOTE).into()
},
None => {
return InvalidTransaction::Custom(INVALID_TX_BAD_VALIDATOR_IDX).into()
},
}
ValidTransaction::with_tag_prefix("PvfPreCheckingVote")
@@ -1419,7 +1422,7 @@ pub mod pezpallet {
.propagate(true)
.build()
},
Call::apply_authorized_force_set_current_code { para, new_code } =>
Call::apply_authorized_force_set_current_code { para, new_code } => {
match Self::validate_code_is_authorized(new_code, para) {
Ok(authorized_code) => {
let now = pezframe_system::Pezpallet::<T>::block_number();
@@ -1432,9 +1435,11 @@ pub mod pezpallet {
.propagate(true)
.build()
},
Err(_) =>
return InvalidTransaction::Custom(INVALID_TX_UNAUTHORIZED_CODE).into(),
},
Err(_) => {
return InvalidTransaction::Custom(INVALID_TX_UNAUTHORIZED_CODE).into()
},
}
},
_ => InvalidTransaction::Call.into(),
}
}
@@ -1500,10 +1505,10 @@ impl<T: Config> Pezpallet<T> {
/// Called by the initializer to initialize the paras pezpallet.
pub(crate) fn initializer_initialize(now: BlockNumberFor<T>) -> Weight {
Self::prune_old_code(now) +
Self::process_scheduled_upgrade_changes(now) +
Self::process_future_code_upgrades_at(now) +
Self::prune_expired_authorizations(now)
Self::prune_old_code(now)
+ Self::process_scheduled_upgrade_changes(now)
+ Self::process_future_code_upgrades_at(now)
+ Self::prune_expired_authorizations(now)
}
/// Called by the initializer to finalize the paras pezpallet.
@@ -1582,8 +1587,8 @@ impl<T: Config> Pezpallet<T> {
ParaLifecycles::<T>::insert(&para, ParaLifecycle::Parathread);
},
// Offboard a lease holding or on-demand teyrchain from the system
Some(ParaLifecycle::OffboardingTeyrchain) |
Some(ParaLifecycle::OffboardingParathread) => {
Some(ParaLifecycle::OffboardingTeyrchain)
| Some(ParaLifecycle::OffboardingParathread) => {
teyrchains.remove(para);
Heads::<T>::remove(&para);
@@ -1913,8 +1918,8 @@ impl<T: Config> Pezpallet<T> {
//
// we cannot onboard at the current session, so it must be at least one
// session ahead.
let onboard_at: SessionIndex = shared::CurrentSessionIndex::<T>::get() +
cmp::max(shared::SESSION_DELAY.saturating_sub(sessions_observed), 1);
let onboard_at: SessionIndex = shared::CurrentSessionIndex::<T>::get()
+ cmp::max(shared::SESSION_DELAY.saturating_sub(sessions_observed), 1);
ActionsQueue::<T>::mutate(onboard_at, |v| {
if let Err(i) = v.binary_search(&id) {
@@ -2117,8 +2117,8 @@ fn remove_upgrade_cooldown_works() {
assert_ok!(Call::<Test>::remove_upgrade_cooldown { para: para_id }
.dispatch_bypass_filter(RuntimeOrigin::signed(1)));
let expected_issuance = issuance -
Pezpallet::<Test>::calculate_remove_upgrade_cooldown_cost(next_possible_upgrade_at);
let expected_issuance = issuance
- Pezpallet::<Test>::calculate_remove_upgrade_cooldown_cost(next_possible_upgrade_at);
// Check that we burned the funds
assert_eq!(expected_issuance, Balances::total_issuance());