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
+9 -7
View File
@@ -443,9 +443,9 @@ pub mod pezpallet {
fn integrity_test() {
/// Calculate the maximum weight that a lookup of a given size can take.
fn lookup_weight<T: Config>(s: usize) -> Weight {
T::WeightInfo::service_agendas_base() +
T::WeightInfo::service_agenda_base(T::MaxScheduledPerBlock::get()) +
T::WeightInfo::service_task(Some(s), true, true)
T::WeightInfo::service_agendas_base()
+ T::WeightInfo::service_agenda_base(T::MaxScheduledPerBlock::get())
+ T::WeightInfo::service_task(Some(s), true, true)
}
let limit = pezsp_runtime::Perbill::from_percent(90) * T::MaximumWeight::get();
@@ -1408,10 +1408,11 @@ impl<T: Config> Pezpallet<T> {
}
let wake = now.saturating_add(period);
match Self::place_task(wake, task) {
Ok(new_address) =>
Ok(new_address) => {
if let Some(retry_config) = maybe_retry_config {
Retries::<T>::insert(new_address, retry_config);
},
}
},
Err((_, task)) => {
// TODO: Leave task in storage somewhere for it to be rescheduled
// manually.
@@ -1458,8 +1459,9 @@ impl<T: Config> Pezpallet<T> {
let dispatch_origin = origin.into();
let (maybe_actual_call_weight, result) = match call.dispatch(dispatch_origin) {
Ok(post_info) => (post_info.actual_weight, Ok(())),
Err(error_and_info) =>
(error_and_info.post_info.actual_weight, Err(error_and_info.error)),
Err(error_and_info) => {
(error_and_info.post_info.actual_weight, Err(error_and_info.error))
},
};
let call_weight = maybe_actual_call_weight.unwrap_or(call_weight);
let _ = weight.try_consume(base_weight);
+22 -18
View File
@@ -1640,11 +1640,12 @@ fn on_initialize_weight_is_correct() {
<Test as Config>::BlockNumberProvider::set_block_number(now);
assert_eq!(
Scheduler::on_initialize(42), // block number unused
TestWeightInfo::service_agendas_base() +
TestWeightInfo::service_agenda_base(1) +
<TestWeightInfo as MarginalWeightInfo>::service_task(None, true, true) +
TestWeightInfo::execute_dispatch_unsigned() +
call_weight + Weight::from_parts(4, 0)
TestWeightInfo::service_agendas_base()
+ TestWeightInfo::service_agenda_base(1)
+ <TestWeightInfo as MarginalWeightInfo>::service_task(None, true, true)
+ TestWeightInfo::execute_dispatch_unsigned()
+ call_weight
+ Weight::from_parts(4, 0)
);
assert_eq!(IncompleteSince::<Test>::get(), Some(now + 1));
assert_eq!(logger::log(), vec![(root(), 2600u32)]);
@@ -1654,14 +1655,16 @@ fn on_initialize_weight_is_correct() {
<Test as Config>::BlockNumberProvider::set_block_number(now);
assert_eq!(
Scheduler::on_initialize(123), // block number unused
TestWeightInfo::service_agendas_base() +
TestWeightInfo::service_agenda_base(2) +
<TestWeightInfo as MarginalWeightInfo>::service_task(None, false, true) +
TestWeightInfo::execute_dispatch_unsigned() +
call_weight + Weight::from_parts(3, 0) +
<TestWeightInfo as MarginalWeightInfo>::service_task(None, false, false) +
TestWeightInfo::execute_dispatch_unsigned() +
call_weight + Weight::from_parts(2, 0)
TestWeightInfo::service_agendas_base()
+ TestWeightInfo::service_agenda_base(2)
+ <TestWeightInfo as MarginalWeightInfo>::service_task(None, false, true)
+ TestWeightInfo::execute_dispatch_unsigned()
+ call_weight
+ Weight::from_parts(3, 0)
+ <TestWeightInfo as MarginalWeightInfo>::service_task(None, false, false)
+ TestWeightInfo::execute_dispatch_unsigned()
+ call_weight
+ Weight::from_parts(2, 0)
);
assert_eq!(IncompleteSince::<Test>::get(), Some(now + 1));
assert_eq!(logger::log(), vec![(root(), 2600u32), (root(), 69u32), (root(), 42u32)]);
@@ -1671,11 +1674,12 @@ fn on_initialize_weight_is_correct() {
<Test as Config>::BlockNumberProvider::set_block_number(now);
assert_eq!(
Scheduler::on_initialize(555), // block number unused
TestWeightInfo::service_agendas_base() +
TestWeightInfo::service_agenda_base(1) +
<TestWeightInfo as MarginalWeightInfo>::service_task(None, true, false) +
TestWeightInfo::execute_dispatch_unsigned() +
call_weight + Weight::from_parts(1, 0)
TestWeightInfo::service_agendas_base()
+ TestWeightInfo::service_agenda_base(1)
+ <TestWeightInfo as MarginalWeightInfo>::service_task(None, true, false)
+ TestWeightInfo::execute_dispatch_unsigned()
+ call_weight
+ Weight::from_parts(1, 0)
);
assert_eq!(IncompleteSince::<Test>::get(), Some(now + 1));
assert_eq!(