style(simulation): cargo fmt on the T-1174 batch (gate bounce)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -675,20 +675,8 @@ pub fn build_district_grid(
|
||||
if state.districts.is_empty() {
|
||||
return None;
|
||||
}
|
||||
let cols = state
|
||||
.districts
|
||||
.keys()
|
||||
.map(|p| p.0)
|
||||
.max()
|
||||
.unwrap_or(0) as u32
|
||||
+ 1;
|
||||
let rows = state
|
||||
.districts
|
||||
.keys()
|
||||
.map(|p| p.1)
|
||||
.max()
|
||||
.unwrap_or(0) as u32
|
||||
+ 1;
|
||||
let cols = state.districts.keys().map(|p| p.0).max().unwrap_or(0) as u32 + 1;
|
||||
let rows = state.districts.keys().map(|p| p.1).max().unwrap_or(0) as u32 + 1;
|
||||
let n = (cols * rows) as usize;
|
||||
let mut morphology = vec![0u8; n];
|
||||
let mut elev_q = vec![0u8; n];
|
||||
@@ -2840,8 +2828,13 @@ mod tests {
|
||||
|
||||
// The SAME survey-cell-centre world metres, resolved via the SAME
|
||||
// D-256(b) bridge function derive_district_profile uses internally.
|
||||
let (world_x_m, world_y_m) =
|
||||
district_profile::survey_cell_centre_world_m(cell, gcpr, ta.w, ta.h, params.body_radius_km);
|
||||
let (world_x_m, world_y_m) = district_profile::survey_cell_centre_world_m(
|
||||
cell,
|
||||
gcpr,
|
||||
ta.w,
|
||||
ta.h,
|
||||
params.body_radius_km,
|
||||
);
|
||||
|
||||
// Riparian equivalent: near_perennial_water_at against the same
|
||||
// RiverNetwork, same station spacing/cutoff derive_district_profile
|
||||
@@ -2891,9 +2884,18 @@ mod tests {
|
||||
// returns the default; the wrapper post-call-overrides it.
|
||||
expected.basin_direction = basin;
|
||||
|
||||
assert_eq!(batch_profile.morphology_zone as u8, expected.morphology_zone as u8);
|
||||
assert_eq!(batch_profile.tectonic_class as u8, expected.tectonic_class as u8);
|
||||
assert_eq!(batch_profile.glaciation_grade as u8, expected.glaciation_grade as u8);
|
||||
assert_eq!(
|
||||
batch_profile.morphology_zone as u8,
|
||||
expected.morphology_zone as u8
|
||||
);
|
||||
assert_eq!(
|
||||
batch_profile.tectonic_class as u8,
|
||||
expected.tectonic_class as u8
|
||||
);
|
||||
assert_eq!(
|
||||
batch_profile.glaciation_grade as u8,
|
||||
expected.glaciation_grade as u8
|
||||
);
|
||||
assert_eq!(
|
||||
batch_profile.precipitation_class as u8,
|
||||
expected.precipitation_class as u8
|
||||
@@ -2908,7 +2910,10 @@ mod tests {
|
||||
batch_profile.vegetation_class as u8,
|
||||
expected.vegetation_class as u8
|
||||
);
|
||||
assert_eq!(batch_profile.basin_direction as u8, expected.basin_direction as u8);
|
||||
assert_eq!(
|
||||
batch_profile.basin_direction as u8,
|
||||
expected.basin_direction as u8
|
||||
);
|
||||
}
|
||||
|
||||
/// D-256(c) invariant: the wrapper (`derive_district_profile`) ≡ core
|
||||
|
||||
Reference in New Issue
Block a user