refactor(server): fix clippy warnings from Rust 1.93

- Use #[derive(Default)] + #[default] instead of manual Default impls
  for FacingDirection, KnowledgeState, RelationshipState, EntityVisibility
- Replace manual modulo check with .is_multiple_of()
- Collapse nested if in shadowcast symmetry check

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-12 18:18:04 +01:00
co-authored by Claude Opus 4.6
parent 2fd16f08b0
commit ad653cffc3
4 changed files with 12 additions and 34 deletions
+3 -5
View File
@@ -286,11 +286,9 @@ fn has_line_of_sight(
loop {
// Check if we hit a blocking tile BEFORE reaching target
if (x != x0 || y != y0) && (x != x1 || y != y1) {
if is_opaque(x, y) {
// Hit an obstacle before reaching target - blocked
return false;
}
if (x != x0 || y != y0) && (x != x1 || y != y1) && is_opaque(x, y) {
// Hit an obstacle before reaching target - blocked
return false;
}
// If we reach the target, we can see it