style(simulation): cargo fmt
Formatting normalization caught by pre-push hook. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -654,10 +654,7 @@ fn collect_remembered_entities(
|
||||
/// ObjectType + proximity. Phase 2 (here) reads the observer's KnowledgeGraph
|
||||
/// to filter, augment, and relabel. This separation keeps D-010 principle 1
|
||||
/// (info boundary) clean — simulation doesn't know what the observer knows.
|
||||
fn apply_phase2_verb_filter(
|
||||
interactions: &mut [NearbyInteraction],
|
||||
observer_kg: &KnowledgeGraph,
|
||||
) {
|
||||
fn apply_phase2_verb_filter(interactions: &mut [NearbyInteraction], observer_kg: &KnowledgeGraph) {
|
||||
for interaction in interactions.iter_mut() {
|
||||
let stable_id = StableId(interaction.entity_id);
|
||||
let knowledge = observer_kg.entity_knowledge(&stable_id);
|
||||
|
||||
@@ -190,8 +190,7 @@ pub fn process_examine_interaction(
|
||||
>,
|
||||
examine_text_query: Query<(&TilePosition, Option<&ExamineText>)>,
|
||||
) {
|
||||
let Ok((player_entity, player_pos, examine_req, mut result_buffer)) =
|
||||
player_query.single_mut()
|
||||
let Ok((player_entity, player_pos, examine_req, mut result_buffer)) = player_query.single_mut()
|
||||
else {
|
||||
return;
|
||||
};
|
||||
|
||||
@@ -989,10 +989,7 @@ mod tests {
|
||||
// Clear the resource to prove load restores it, not the pre-existing value.
|
||||
world.insert_resource(SelectedBookmark::default());
|
||||
assert!(
|
||||
world
|
||||
.resource::<SelectedBookmark>()
|
||||
.bookmark_id
|
||||
.is_none(),
|
||||
world.resource::<SelectedBookmark>().bookmark_id.is_none(),
|
||||
"bookmark must be cleared before load"
|
||||
);
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ use bevy_ecs::entity::Entity;
|
||||
use bevy_ecs::world::World;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use crate::bookmark::SelectedBookmark;
|
||||
use crate::knowledge::graph::KnowledgeGraph;
|
||||
use crate::knowledge::registry::StableEntityId;
|
||||
use crate::knowledge::types::StableId;
|
||||
@@ -51,7 +52,6 @@ use crate::npc::{
|
||||
PersonalityTraits, Relationships, Secret, SecretSeverity, SkillSet, TellSystem,
|
||||
ToleranceThreshold, Want, WantKind,
|
||||
};
|
||||
use crate::bookmark::SelectedBookmark;
|
||||
use crate::simulation::modification::Modification;
|
||||
use crate::simulation::movement::TilePosition;
|
||||
use crate::simulation::time::TickRate;
|
||||
@@ -916,7 +916,10 @@ mod tests {
|
||||
|
||||
// Idempotent re-serialize: bytes must be stable
|
||||
let bytes2 = recovered.to_bytes().expect("re-serialize");
|
||||
assert_eq!(bytes, bytes2, "SelectedBookmark roundtrip must be idempotent");
|
||||
assert_eq!(
|
||||
bytes, bytes2,
|
||||
"SelectedBookmark roundtrip must be idempotent"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user