From 1c21863b72730281ff0a2e4f287c799dc90b588b Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Thu, 23 Jul 2026 16:04:36 +0200 Subject: [PATCH] =?UTF-8?q?style(simulation):=20cargo=20fmt=20=E2=80=94=20?= =?UTF-8?q?review-round=20test=20code=20wraps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 --- server/src/atlas/layer_proxy.rs | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/server/src/atlas/layer_proxy.rs b/server/src/atlas/layer_proxy.rs index f0c7a97ae..5cff36a08 100644 --- a/server/src/atlas/layer_proxy.rs +++ b/server/src/atlas/layer_proxy.rs @@ -3070,7 +3070,12 @@ mod tests { (lo.min(p.1), hi.max(p.1)) }); let margin = 50_000.0; - let window_rect = (min_x - margin, min_y - margin, max_x + margin, max_y + margin); + let window_rect = ( + min_x - margin, + min_y - margin, + max_x + margin, + max_y + margin, + ); let wire = crop_course_to_window( &course, @@ -3083,7 +3088,12 @@ mod tests { 0.0, station_spacing_m, ) - .unwrap_or_else(|| panic!("Mouth edge {:?} cropped to nothing in its own window", edge.edge_id)); + .unwrap_or_else(|| { + panic!( + "Mouth edge {:?} cropped to nothing in its own window", + edge.edge_id + ) + }); assert_eq!( wire.terminus, @@ -3159,8 +3169,7 @@ mod tests { .find(|e| e.terminus == river_course::EdgeTerminusKind::Mouth) .expect("GJ1c fixture must have at least one Mouth edge"); - let course = - river_course::invent_course(seed, edge, &ta, ¶ms, station_spacing_m, 0.0); + let course = river_course::invent_course(seed, edge, &ta, ¶ms, station_spacing_m, 0.0); assert!( course.points.len() >= 2, "need a non-degenerate course to construct a meaningful upstream cut" @@ -3291,7 +3300,12 @@ mod tests { heightmap }; - let dr = drainage::analyze(&working.data, working.width, working.height, working.sea_level); + let dr = drainage::analyze( + &working.data, + working.width, + working.height, + working.sea_level, + ); let ta = crate::atlas::features::TerrainAnalysis::analyze(&working, &dr); let rn = &dr.river_network; @@ -3302,7 +3316,10 @@ mod tests { .iter() .find(|e| e.edge_id == river_course::pack_cell_id(target_px)) .expect("GJ380c must have a Mouth edge at the live-captured cell"); - assert_eq!(edge.edge_id, 4129122, "must be the same edge the live capture reported"); + assert_eq!( + edge.edge_id, 4129122, + "must be the same edge the live capture reported" + ); let seed = SeedChain::for_body(0, "GJ380c"); // production default world_seed let climate = crate::atlas::district_profile::ClimateConstants::default();