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 -11
View File
@@ -103,10 +103,7 @@ impl VoiceCacheStore {
pub fn zone_cache(&mut self, zone_id: u32) -> &mut ZoneVoiceCache {
if !self.zones.contains_key(&zone_id) {
let cache = self.load_zone(zone_id).unwrap_or_else(|| {
ZoneVoiceCache::new(
self.model_version.clone(),
self.injector_version.clone(),
)
ZoneVoiceCache::new(self.model_version.clone(), self.injector_version.clone())
});
self.zones.insert(zone_id, cache);
}
@@ -139,8 +136,7 @@ impl VoiceCacheStore {
fs::create_dir_all(&dir)?;
let path = dir.join(format!("{}.msgpack", zone_id));
let data = rmp_serde::to_vec(cache)
.map_err(|e| io::Error::new(io::ErrorKind::Other, e))?;
let data = rmp_serde::to_vec(cache).map_err(io::Error::other)?;
fs::write(path, data)
}
@@ -163,10 +159,7 @@ impl VoiceCacheStore {
if cache.model_version != self.model_version
|| cache.injector_version != self.injector_version
{
tracing::info!(
zone_id,
"voice cache version mismatch — invalidating"
);
tracing::info!(zone_id, "voice cache version mismatch — invalidating");
return None;
}
@@ -286,7 +279,10 @@ mod tests {
let data = rmp_serde::to_vec(&cache).unwrap();
let restored: ZoneVoiceCache = rmp_serde::from_slice(&data).unwrap();
assert_eq!(restored.lookup(&key), Some("Hands are steady. Eyes aren't."));
assert_eq!(
restored.lookup(&key),
Some("Hands are steady. Eyes aren't.")
);
assert_eq!(restored.model_version, "v1");
}