diff --git a/server/src/atlas/step_canvas.rs b/server/src/atlas/step_canvas.rs index eddb3ea33..bb639c6c0 100644 --- a/server/src/atlas/step_canvas.rs +++ b/server/src/atlas/step_canvas.rs @@ -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); } @@ -1929,15 +1935,19 @@ mod tests { #[test] fn global_rung_stays_two_to_one_at_every_viewport_shape() { for req in [ - (960u32, 540u32), // 16:9 landscape — height-bound - (540, 960), // portrait — height is huge, width binds - (700, 700), // square - (4000, 100), // absurdly wide - (1, 1), // degenerate + (960u32, 540u32), // 16:9 landscape — height-bound + (540, 960), // portrait — height is huge, width binds + (700, 700), // square + (4000, 100), // absurdly wide + (1, 1), // degenerate (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