feat(ci): ban HashMap in simulation crate via clippy (#343)

Add clippy::disallowed_types for std::collections::HashMap scoped to
the simulation crate. Replace HashMap with BTreeMap in movement.rs for
deterministic iteration order. Allow exception in perception/query.rs
where iteration order is irrelevant (per-frame scratch buffer).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 13:34:04 +01:00
co-authored by Claude Opus 4.6
parent f7e5b7eb63
commit 0f5a990f82
3 changed files with 25 additions and 8 deletions
+5
View File
@@ -4,6 +4,11 @@
//! (natural vision, thermal, EM, etc.) implements PerceptionQuery to
//! provide mode-specific FOV and visibility sector computation.
//! v0.1 implements only NaturalVision.
//!
//! Note: HashMap is used for `sector_lookup` — a per-frame scratch buffer
//! looked up only by key. Iteration order is irrelevant here. Not subject to
//! the simulation determinism constraint (see server/.clippy.toml).
#![allow(clippy::disallowed_types)]
use std::collections::{BTreeSet, HashMap};