bench: use is_multiple_of instead of manual modulo check (#7984)

Addresses clippy::manual_is_multiple_of warning on latest stable.
This commit is contained in:
Charlie Tonneslan
2026-03-22 14:00:12 +01:00
committed by GitHub
parent 66c786540e
commit 467d614267
+4 -1
View File
@@ -19,7 +19,10 @@ use tokio::runtime::{self, Runtime};
/// Total number of tasks spawned across all threads per iteration.
/// Must be divisible by the largest parallelism level (64).
const TOTAL_TASKS: usize = 12_800;
const _: () = assert!(TOTAL_TASKS % 64 == 0, "TOTAL_TASKS must be divisible by 64");
const _: () = assert!(
TOTAL_TASKS.is_multiple_of(64),
"TOTAL_TASKS must be divisible by 64"
);
fn remote_spawn_contention(c: &mut Criterion) {
let parallelism_levels = parallelism_levels();