From a64701645b41f00924ab833d3b56ed9a5c85d569 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sat, 25 Jul 2026 03:19:25 +0200 Subject: [PATCH] style(simulation): clippy nits on the step-canvas batch (gate bounce) Two needless mutable borrows in the serve system, one spurious markdown list marker from a doc-comment line wrap (a leading '- ' turned the whole T-1186 convention note into a lazy continuation), and a named row/col pair replacing the identity-op grid index in the settlement-id tie test. Co-Authored-By: Claude Fable 5 --- server/src/atlas/plugin.rs | 4 ++-- server/src/atlas/step_canvas.rs | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/server/src/atlas/plugin.rs b/server/src/atlas/plugin.rs index 425a0cbcf..41cfdb953 100644 --- a/server/src/atlas/plugin.rs +++ b/server/src/atlas/plugin.rs @@ -268,8 +268,8 @@ fn serve_step_canvas_requests( let resp = match resolver.as_ref() { Some(r) => serve_step_canvas_request( &req, - &mut global_cache.as_mut(), - &mut canvas_cache.as_mut(), + global_cache.as_mut(), + canvas_cache.as_mut(), &queue, &r.0, params_reader, diff --git a/server/src/atlas/step_canvas.rs b/server/src/atlas/step_canvas.rs index a58cf281a..6af05a3cd 100644 --- a/server/src/atlas/step_canvas.rs +++ b/server/src/atlas/step_canvas.rs @@ -770,8 +770,8 @@ fn resolve_canvas_extent( /// every fixed rung (the canvas centre in world metres). /// /// **Row-space convention (T-1186 interaction — MUST READ):** the Global -/// (rung-0) canvas uses **equator-anchored SIGNED region rows** (`wy = (row -/// - rows/2) * REGION_M`, negative = north), matching the canonical +/// (rung-0) canvas uses **equator-anchored SIGNED region rows** +/// (`wy = (row - rows/2) * REGION_M`, negative = north), matching the canonical /// `derive_orbital_at_metres`/`derive_at_metres_with_riparian` convention /// (D-256(a): the ONE absolute-metre derive core; that core's own internal /// `district_pos` floor-division and `lat_frac` computation are both @@ -1866,7 +1866,8 @@ mod tests { 3, StepCanvasRung::Chunk.spacing_m(), ); - let centre_i = 1 * 3 + 1; + let (centre_row, centre_col) = (1usize, 1usize); + let centre_i = centre_row * 3 + centre_col; assert_eq!(ids[centre_i], 3, "tie must resolve to the LOWEST city_id"); }