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
+14 -11
View File
@@ -989,9 +989,9 @@ impl<T: Config> Pezpallet<T> {
if let (Some(service_weight), Some(on_idle)) =
(T::ServiceWeight::get(), T::IdleMaxServiceWeight::get())
{
if !(service_weight.all_gt(on_idle) ||
on_idle.all_gt(service_weight) ||
service_weight == on_idle)
if !(service_weight.all_gt(on_idle)
|| on_idle.all_gt(service_weight)
|| service_weight == on_idle)
{
return Err("One of `ServiceWeight` or `IdleMaxServiceWeight` needs to be `all_gt` or both need to be equal.".into());
}
@@ -1096,8 +1096,8 @@ impl<T: Config> Pezpallet<T> {
page.peek_index(index.into() as usize).ok_or(Error::<T>::NoMessage)?;
let payload_len = payload.len() as u64;
ensure!(
page_index < book_state.begin ||
(page_index == book_state.begin && pos < page.first.into() as usize),
page_index < book_state.begin
|| (page_index == book_state.begin && pos < page.first.into() as usize),
Error::<T>::Queued
);
ensure!(!is_processed, Error::<T>::AlreadyProcessed);
@@ -1114,8 +1114,9 @@ impl<T: Config> Pezpallet<T> {
// additional overweight event being deposited.
) {
Overweight | InsufficientWeight => Err(Error::<T>::InsufficientWeight),
StackLimitReached | Unprocessable { permanent: false } =>
Err(Error::<T>::TemporarilyUnprocessable),
StackLimitReached | Unprocessable { permanent: false } => {
Err(Error::<T>::TemporarilyUnprocessable)
},
Unprocessable { permanent: true } | Processed => {
page.note_processed_at_pos(pos);
book_state.message_count.saturating_dec();
@@ -1657,7 +1658,7 @@ impl<T: Config> Pezpallet<T> {
let (progressed, n) =
Self::service_queue(next.clone(), &mut weight, overweight_limit);
next = match n {
Some(n) =>
Some(n) => {
if !progressed {
if last_no_progress == Some(n.clone()) {
break;
@@ -1669,7 +1670,8 @@ impl<T: Config> Pezpallet<T> {
} else {
last_no_progress = None;
n
},
}
},
None => break,
}
}
@@ -1780,8 +1782,9 @@ impl<T: Config> ServiceQueues for Pezpallet<T> {
Error::<T>::InsufficientWeight => ExecuteOverweightError::InsufficientWeight,
Error::<T>::AlreadyProcessed => ExecuteOverweightError::AlreadyProcessed,
Error::<T>::QueuePaused => ExecuteOverweightError::QueuePaused,
Error::<T>::NoPage | Error::<T>::NoMessage | Error::<T>::Queued =>
ExecuteOverweightError::NotFound,
Error::<T>::NoPage | Error::<T>::NoMessage | Error::<T>::Queued => {
ExecuteOverweightError::NotFound
},
Error::<T>::RecursiveDisallowed => ExecuteOverweightError::RecursiveDisallowed,
_ => ExecuteOverweightError::Other,
})
@@ -876,8 +876,8 @@ fn page_try_append_message_basic_works() {
msgs += 1;
}
}
let expected_msgs = (<Test as Config>::HeapSize::get()) /
(ItemHeader::<<Test as Config>::Size>::max_encoded_len() as u32 + 4);
let expected_msgs = (<Test as Config>::HeapSize::get())
/ (ItemHeader::<<Test as Config>::Size>::max_encoded_len() as u32 + 4);
assert_eq!(expected_msgs, msgs, "Wrong number of messages");
assert_eq!(page.remaining, msgs);
assert_eq!(page.remaining_size, msgs * 4);
@@ -1441,8 +1441,8 @@ fn ready_ring_knit_and_unknit_works() {
#[test]
fn enqueue_message_works() {
use MessageOrigin::*;
let max_msg_per_page = <Test as Config>::HeapSize::get() as u64 /
(ItemHeader::<<Test as Config>::Size>::max_encoded_len() as u64 + 1);
let max_msg_per_page = <Test as Config>::HeapSize::get() as u64
/ (ItemHeader::<<Test as Config>::Size>::max_encoded_len() as u64 + 1);
build_and_execute::<Test>(|| {
// Enqueue messages which should fill three pages.
@@ -1471,8 +1471,8 @@ fn enqueue_message_works() {
#[test]
fn enqueue_messages_works() {
use MessageOrigin::*;
let max_msg_per_page = <Test as Config>::HeapSize::get() as u64 /
(ItemHeader::<<Test as Config>::Size>::max_encoded_len() as u64 + 1);
let max_msg_per_page = <Test as Config>::HeapSize::get() as u64
/ (ItemHeader::<<Test as Config>::Size>::max_encoded_len() as u64 + 1);
build_and_execute::<Test>(|| {
// Enqueue messages which should fill three pages.