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
+21 -16
View File
@@ -100,8 +100,9 @@ impl Metric {
match self {
Self::Sr25519Verify => Cow::Borrowed("SR25519-Verify"),
Self::Blake2256 => Cow::Borrowed("BLAKE2-256"),
Self::Blake2256Parallel { num_cores } =>
Cow::Owned(format!("BLAKE2-256-Parallel-{}", num_cores)),
Self::Blake2256Parallel { num_cores } => {
Cow::Owned(format!("BLAKE2-256-Parallel-{}", num_cores))
},
Self::MemCopy => Cow::Borrowed("Copy"),
Self::DiskSeqWrite => Cow::Borrowed("Seq Write"),
Self::DiskRndWrite => Cow::Borrowed("Rnd Write"),
@@ -411,8 +412,8 @@ pub fn benchmark_cpu_parallelism(limit: ExecutionLimit, refhw_num_cores: usize)
let average_score = benchmark_threads
.into_iter()
.map(|thread| thread.join().map(|throughput| throughput.as_kibs()).unwrap_or(0.0))
.sum::<f64>() /
refhw_num_cores as f64;
.sum::<f64>()
/ refhw_num_cores as f64;
Throughput::from_kibs(average_score)
}
@@ -727,14 +728,15 @@ impl Requirements {
}
match requirement.metric {
Metric::Blake2256 =>
Metric::Blake2256 => {
if requirement.minimum > hwbench.cpu_hashrate_score {
failures.push(CheckFailure {
metric: requirement.metric,
expected: requirement.minimum,
found: hwbench.cpu_hashrate_score,
});
},
}
},
Metric::Blake2256Parallel { .. } => {
if requirement.minimum > hwbench.parallel_cpu_hashrate_score {
failures.push(CheckFailure {
@@ -744,15 +746,16 @@ impl Requirements {
});
}
},
Metric::MemCopy =>
Metric::MemCopy => {
if requirement.minimum > hwbench.memory_memcpy_score {
failures.push(CheckFailure {
metric: requirement.metric,
expected: requirement.minimum,
found: hwbench.memory_memcpy_score,
});
},
Metric::DiskSeqWrite =>
}
},
Metric::DiskSeqWrite => {
if let Some(score) = hwbench.disk_sequential_write_score {
if requirement.minimum > score {
failures.push(CheckFailure {
@@ -761,8 +764,9 @@ impl Requirements {
found: score,
});
}
},
Metric::DiskRndWrite =>
}
},
Metric::DiskRndWrite => {
if let Some(score) = hwbench.disk_random_write_score {
if requirement.minimum > score {
failures.push(CheckFailure {
@@ -771,7 +775,8 @@ impl Requirements {
found: score,
});
}
},
}
},
Metric::Sr25519Verify => {},
}
}
@@ -820,16 +825,16 @@ mod tests {
#[test]
fn test_benchmark_disk_sequential_writes() {
assert!(
benchmark_disk_sequential_writes(DEFAULT_DISK_EXECUTION_LIMIT, "./".as_ref()).unwrap() >
Throughput::from_mibs(0.0)
benchmark_disk_sequential_writes(DEFAULT_DISK_EXECUTION_LIMIT, "./".as_ref()).unwrap()
> Throughput::from_mibs(0.0)
);
}
#[test]
fn test_benchmark_disk_random_writes() {
assert!(
benchmark_disk_random_writes(DEFAULT_DISK_EXECUTION_LIMIT, "./".as_ref()).unwrap() >
Throughput::from_mibs(0.0)
benchmark_disk_random_writes(DEFAULT_DISK_EXECUTION_LIMIT, "./".as_ref()).unwrap()
> Throughput::from_mibs(0.0)
);
}