style(simulation): gate bounce — box GenCompletion::BodyAnalyzed state; clippy/fmt sweeps

BodyWorldState grew past clippy's large-enum-variant threshold when it
began retaining Layer1Output (T-1170 Ruling 4b) — boxed, with the two
insert sites deref'd; manual_contains x2 (drainage tests),
cloned_ref_to_slice_refs x3 (river_course tests), fmt wraps.
gen_queue 18/18; clippy -D warnings clean; fmt --check clean.

Tickets: T-1170

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 14:14:23 +02:00
co-authored by Claude Fable 5
parent 27fab8566a
commit 958de5420e
6 changed files with 232 additions and 59 deletions
+5 -2
View File
@@ -272,7 +272,10 @@ pub enum GenCompletion {
BodyAnalyzed {
body_id: String,
/// The computed world state, ready for `BodyWorldStateCache::insert`.
state: BodyWorldState,
/// Boxed: `BodyWorldState` grew past clippy's large-enum-variant
/// threshold when it began retaining `Layer1Output` (T-1170 Ruling 4b)
/// — the box keeps the enum small while the state moves by pointer.
state: Box<BodyWorldState>,
},
SkeletonGenerated {
city_id: u64,
@@ -726,7 +729,7 @@ fn run_work_item(
);
GenCompletion::BodyAnalyzed {
body_id: body_id.clone(),
state: snapshot.into_body_world_state(),
state: Box::new(snapshot.into_body_world_state()),
}
}
Err(e) => GenCompletion::Failed {