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
+7 -8
View File
@@ -163,7 +163,7 @@ pub fn update_character_pressure(
mut player_query: Query<(Entity, &mut CharacterPressure), With<PlayerCharacter>>,
) {
// Only run on interval ticks
if time.tick % PRESSURE_UPDATE_INTERVAL != 0 {
if !time.tick.is_multiple_of(PRESSURE_UPDATE_INTERVAL) {
return;
}
@@ -210,8 +210,8 @@ mod tests {
use crate::npc::relationships::{RelationshipEdge, RelationshipGraph};
use crate::npc::{Npc, RelationshipKind};
use crate::simulation::movement::PlayerCharacter;
use crate::simulation::time::SimulationTime;
use crate::simulation::tier::ActiveSim;
use crate::simulation::time::SimulationTime;
use bevy_ecs::world::World;
fn setup_world() -> World {
@@ -251,7 +251,10 @@ mod tests {
let mut q = world.query::<&CharacterPressure>();
let pressure = q.single(&world).unwrap();
assert_eq!(pressure.exposure, 0, "should not update on non-interval tick");
assert_eq!(
pressure.exposure, 0,
"should not update on non-interval tick"
);
}
#[test]
@@ -301,11 +304,7 @@ mod tests {
}
// 2 non-suspicious NPCs
for _ in 0..2 {
world.spawn((
Npc,
ActiveSim,
PlayerAwareness::default(),
));
world.spawn((Npc, ActiveSim, PlayerAwareness::default()));
}
world.spawn((PlayerCharacter, CharacterPressure::default()));