style(simulation): fmt + clippy fixes for the measurement batch (gate bounce)

cargo fmt across the four new files; needless_range_loop x2 (enumerate /
iter_mut) and identity_op in hydrology_equilibrium.rs. cargo test was green
on the bounced push — lint-only fixes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 19:25:08 +02:00
co-authored by Claude Fable 5
parent 473b654787
commit 976d4016e9
4 changed files with 129 additions and 71 deletions
+26 -12
View File
@@ -249,7 +249,9 @@ fn bench_square_window_production_fn_district_spacing_single_thread() {
let climate = ClimateConstants::default();
let seed = SeedChain::root(99).derive(SeedDomain::Body, 1);
println!("\n=== T-1178 square-window production-fn bench, SINGLE THREAD (District spacing) ===\n");
println!(
"\n=== T-1178 square-window production-fn bench, SINGLE THREAD (District spacing) ===\n"
);
// 8.3M cells single-thread is the ~12s-class case the design doc
// extrapolated (§7); 330K/2.07M included for the full comparison table.
@@ -496,7 +498,9 @@ fn bench_rect_canvas_district_spacing() {
let seed = SeedChain::root(99).derive(SeedDomain::Body, 1);
let min_wl_m = scale::DISTRICT_M as f64;
println!("\n=== T-1178 real 16:9 canvas bench, replica row-chunked loop (District spacing) ===");
println!(
"\n=== T-1178 real 16:9 canvas bench, replica row-chunked loop (District spacing) ==="
);
println!(" {}\n", rayon_threads_report());
let shapes: [(u32, u32, &str); 3] = [
@@ -612,9 +616,8 @@ fn bench_block_and_tile_spacing_4096_cells() {
for col in 0..grid_side {
let wx = col as f64 * step_m;
let wy = row as f64 * step_m;
let prof = derive_at_metres(
seed, "bench", &params, &ta, wx, wy, &climate, cutoff_m, &[],
);
let prof =
derive_at_metres(seed, "bench", &params, &ta, wx, wy, &climate, cutoff_m, &[]);
std::hint::black_box(prof.elev_q);
}
}
@@ -657,7 +660,10 @@ fn bench_deep_step_realistic_canvas_83k_cells() {
let rows = 216u32; // world metres on the smaller (2160px/10) axis
let cols = 384u32; // world metres on the larger (3840px/10) axis
let cells = (rows as u64) * (cols as u64);
assert_eq!(cells, 82_944, "geometry must match the ticket's stated ~83K cells exactly");
assert_eq!(
cells, 82_944,
"geometry must match the ticket's stated ~83K cells exactly"
);
let step_m = 1.0_f64;
let cutoff_m = 1.0_f64; // Nyquist-matched to 1 m spacing
@@ -747,9 +753,18 @@ fn bench_block_cutoff_confirms_savings() {
for (label, cutoff_m) in [
("uncut (cutoff=0)", 0.0),
("cutoff=128m (Block's own floor, expect NO delta vs uncut)", block_m),
("cutoff=2048m (District-coarse, truncates the VOXEL band, real savings)", district_m),
("cutoff=204800m (Region-coarse, expect EVERY octave truncated)", region_m),
(
"cutoff=128m (Block's own floor, expect NO delta vs uncut)",
block_m,
),
(
"cutoff=2048m (District-coarse, truncates the VOXEL band, real savings)",
district_m,
),
(
"cutoff=204800m (Region-coarse, expect EVERY octave truncated)",
region_m,
),
] {
let n_cells = (grid_side * grid_side) as u64;
let t0 = Instant::now();
@@ -760,9 +775,8 @@ fn bench_block_cutoff_confirms_savings() {
// effect from a spacing change.
let wx = col as f64 * block_m;
let wy = row as f64 * block_m;
let prof = derive_at_metres(
seed, "bench", &params, &ta, wx, wy, &climate, cutoff_m, &[],
);
let prof =
derive_at_metres(seed, "bench", &params, &ta, wx, wy, &climate, cutoff_m, &[]);
std::hint::black_box(prof.elev_q);
}
}