refactor(server): apply rustfmt and clippy suggestions
Formatting pass across simulation, perception, knowledge, NPC, and test modules. Includes two clippy fixes in monologue.rs (.values() instead of for (_, v) pattern). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -210,14 +210,12 @@ mod tests {
|
||||
let mut schedule = bevy_ecs::schedule::Schedule::default();
|
||||
schedule.add_systems((
|
||||
compute_visibility_geometry,
|
||||
compute_observer_snapshot
|
||||
.after(compute_visibility_geometry),
|
||||
compute_observer_snapshot.after(compute_visibility_geometry),
|
||||
crate::perception::observation::emit_observation_events
|
||||
.after(compute_observer_snapshot),
|
||||
generate_observation_events
|
||||
.after(crate::perception::observation::emit_observation_events),
|
||||
crate::knowledge::events::process_knowledge_events
|
||||
.after(generate_observation_events),
|
||||
crate::knowledge::events::process_knowledge_events.after(generate_observation_events),
|
||||
));
|
||||
schedule.run(world);
|
||||
}
|
||||
@@ -228,8 +226,7 @@ mod tests {
|
||||
let mut registry = EntityRegistry::new(0);
|
||||
|
||||
// Set time to Afternoon
|
||||
world.resource_mut::<SimulationTime>().tick =
|
||||
MINUTES_PER_PHASE * TICKS_PER_GAME_MINUTE;
|
||||
world.resource_mut::<SimulationTime>().tick = MINUTES_PER_PHASE * TICKS_PER_GAME_MINUTE;
|
||||
|
||||
let player = world
|
||||
.spawn((
|
||||
@@ -381,7 +378,11 @@ mod tests {
|
||||
)
|
||||
})
|
||||
.collect();
|
||||
assert_eq!(absences.len(), 1, "should detect absence at visible location");
|
||||
assert_eq!(
|
||||
absences.len(),
|
||||
1,
|
||||
"should detect absence at visible location"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -401,9 +402,7 @@ mod tests {
|
||||
.id();
|
||||
registry.register(player);
|
||||
|
||||
let npc = world
|
||||
.spawn((Npc, TilePosition::new(16, 14, 0)))
|
||||
.id();
|
||||
let npc = world.spawn((Npc, TilePosition::new(16, 14, 0))).id();
|
||||
let npc_sid = registry.register(npc);
|
||||
|
||||
world.insert_resource(registry);
|
||||
@@ -428,9 +427,7 @@ mod tests {
|
||||
let mut world = setup_world();
|
||||
let mut registry = EntityRegistry::new(0);
|
||||
|
||||
let npc = world
|
||||
.spawn((Npc, TilePosition::new(16, 14, 0)))
|
||||
.id();
|
||||
let npc = world.spawn((Npc, TilePosition::new(16, 14, 0))).id();
|
||||
let npc_sid = registry.register(npc);
|
||||
|
||||
// Player already knows about the NPC
|
||||
|
||||
Reference in New Issue
Block a user