style(simulation): cargo fmt the extent-inversion tests

Hand-written test bodies in step_canvas.rs did not match rustfmt. Caught by
the pre-push gate, which is exactly its job — team-patterns.md's note that
fmt auto-fixes and clippy is a quick lead patch, rather than something agents
should pre-emptively duplicate.

No behaviour change.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-27 01:38:42 +02:00
co-authored by Claude
parent 885a10af09
commit 145e3c8b11
+21 -5
View File
@@ -1677,8 +1677,14 @@ mod tests {
StepCanvasRung::Quarter.extent_m(),
Some(scale::QUARTER_M as f64)
);
assert_eq!(StepCanvasRung::Block.extent_m(), Some(scale::BLOCK_M as f64));
assert_eq!(StepCanvasRung::Chunk.extent_m(), Some(scale::CHUNK_M as f64));
assert_eq!(
StepCanvasRung::Block.extent_m(),
Some(scale::BLOCK_M as f64)
);
assert_eq!(
StepCanvasRung::Chunk.extent_m(),
Some(scale::CHUNK_M as f64)
);
assert_eq!(StepCanvasRung::Global.extent_m(), None);
}
@@ -1937,7 +1943,11 @@ mod tests {
(u32::MAX, u32::MAX), // adversarial
] {
let (w, h) = resolve_canvas_extent(StepCanvasRung::Global, req, 6371.0);
assert_eq!(w, h * 2, "request {req:?} produced a non-2:1 canvas {w}x{h}");
assert_eq!(
w,
h * 2,
"request {req:?} produced a non-2:1 canvas {w}x{h}"
);
assert!(h >= 1, "request {req:?} collapsed the canvas to zero rows");
}
}
@@ -1947,8 +1957,14 @@ mod tests {
#[test]
fn global_rung_still_clamps_an_adversarial_extent() {
let (w, h) = resolve_canvas_extent(StepCanvasRung::Global, (u32::MAX, u32::MAX), 6371.0);
assert!(w <= STEP_CANVAS_MAX_EXTENT_AXIS, "width {w} escaped the axis cap");
assert!(h <= STEP_CANVAS_MAX_EXTENT_AXIS, "height {h} escaped the axis cap");
assert!(
w <= STEP_CANVAS_MAX_EXTENT_AXIS,
"width {w} escaped the axis cap"
);
assert!(
h <= STEP_CANVAS_MAX_EXTENT_AXIS,
"height {h} escaped the axis cap"
);
}
/// A body with no radius is not a sphere (asteroid belt, oort cloud) and