fix(simulation): Clippy cleanup and CI enforcement (#635)

Fix all Clippy warnings across the server codebase (2411 insertions, 1341
deletions). Raise type-complexity-threshold to 750 and too-many-arguments
to 12 in .clippy.toml for idiomatic Bevy ECS system signatures. The server
now passes `cargo clippy -- --deny warnings` cleanly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-17 10:33:15 +01:00
co-authored by Claude Opus 4.6
parent 7f7706442a
commit aa79dd97e7
84 changed files with 2409 additions and 1339 deletions
+14 -12
View File
@@ -404,7 +404,7 @@ fn all_facing_direction_variants_roundtrip() {
conversation_events: vec![],
conversation_ended: vec![],
follow_state: None,
character_pressure: None,
character_pressure: None,
rng_seed: None,
poi_list: vec![],
examine_result: None,
@@ -412,7 +412,7 @@ fn all_facing_direction_variants_roundtrip() {
save_result: None,
triangle_crisis_events: vec![],
state_hash: None,
debug_response: None,
debug_response: None,
sim_errors: vec![],
current_ticker: None,
settings_response: None,
@@ -1706,8 +1706,7 @@ fn fixture_snapshot_minimal_fields() {
#[test]
fn fixture_snapshot_full_fields() {
let bytes = read_named_fixture("snapshot_full");
let snap: ObserverSnapshot =
rmp_serde::from_slice(&bytes).expect("deserialize snapshot_full");
let snap: ObserverSnapshot = rmp_serde::from_slice(&bytes).expect("deserialize snapshot_full");
assert_eq!(snap.version, PROTOCOL_VERSION, "protocol version mismatch");
assert_eq!(snap.tick, 42, "tick should be 42");
@@ -1715,10 +1714,7 @@ fn fixture_snapshot_full_fields() {
// Monologue
let monologue = snap.current_monologue.as_ref().expect("monologue absent");
assert_eq!(monologue.id, "test_monologue_001");
assert_eq!(
monologue.text,
"Something feels off about this place."
);
assert_eq!(monologue.text, "Something feels off about this place.");
// Dialogue
let dialogue = snap.dialogue_response.as_ref().expect("dialogue absent");
@@ -1738,7 +1734,10 @@ fn fixture_snapshot_full_fields() {
assert_eq!(examine.entity_id, 42);
// Player knowledge
let kg = snap.player_knowledge.as_ref().expect("player_knowledge absent");
let kg = snap
.player_knowledge
.as_ref()
.expect("player_knowledge absent");
assert_eq!(kg.entities.len(), 1);
assert_eq!(kg.entities[0].name, "Kael");
assert_eq!(kg.facts.len(), 1);
@@ -1758,8 +1757,7 @@ fn fixture_snapshot_full_fields() {
#[test]
fn fixture_player_input_move_fields() {
let bytes = read_named_fixture("player_input_move");
let input: PlayerInput =
rmp_serde::from_slice(&bytes).expect("deserialize player_input_move");
let input: PlayerInput = rmp_serde::from_slice(&bytes).expect("deserialize player_input_move");
assert_eq!(input.tick, 1, "tick should be 1");
assert!(
@@ -1780,7 +1778,11 @@ fn fixture_player_input_interact_fields() {
target_entity_id,
verb,
} => {
assert_eq!(*target_entity_id, Some(99u64), "target_entity_id should be Some(99)");
assert_eq!(
*target_entity_id,
Some(99u64),
"target_entity_id should be Some(99)"
);
assert_eq!(
verb.as_deref(),
Some("Talk"),