From 1ec5cb4fd55014cc099ee062689827157598d4cc Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sun, 26 Jul 2026 13:16:54 +0200 Subject: [PATCH] =?UTF-8?q?fix(simulation):=20clippy=20=E2=80=94=20erasing?= =?UTF-8?q?=5Fop=20row-major=20literals,=20range-contains=20in=20T-1116=20?= =?UTF-8?q?tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- server/src/atlas/road_graph.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/atlas/road_graph.rs b/server/src/atlas/road_graph.rs index 329ba5b69..7c078d697 100644 --- a/server/src/atlas/road_graph.rs +++ b/server/src/atlas/road_graph.rs @@ -2146,13 +2146,13 @@ mod tests { let grid = RouteGrid::build(&ta, &[], w, h); assert_eq!(grid.scale, 3, "grid_w=180 must downsample at scale=3 for ROUTE_W=64"); - let majority_water_cell = 0 * grid.rw + 3; + let majority_water_cell = 3; // row-major (row 0, col 3) assert_eq!( grid.cost[majority_water_cell], IMPASSABLE, "2-of-3 native cells water (a true majority) must be IMPASSABLE" ); - let minority_water_cell = 0 * grid.rw + 6; + let minority_water_cell = 6; // row-major (row 0, col 6) assert_ne!( grid.cost[minority_water_cell], IMPASSABLE, @@ -2174,7 +2174,7 @@ mod tests { (0, 3), "the surrogate must NOT be the impassable cell itself" ); - assert!(ring >= 1 && ring <= COASTAL_ANCHOR_MAX_RING); + assert!((1..=COASTAL_ANCHOR_MAX_RING).contains(&ring)); } /// T-1116 boundary case: a settlement placement fully surrounded by