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:
@@ -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};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user