chore: fix clippy warnings

This commit is contained in:
2025-08-15 19:48:30 -05:00
parent 6af25af5f3
commit e8944598cc
7 changed files with 31 additions and 165 deletions

View File

@@ -20,7 +20,7 @@ pub struct EdgeProgress {
}
/// Pure spatial position component - works for both static and dynamic entities.
#[derive(Component, Debug, Copy, Clone, PartialEq)]
#[derive(Component, Debug, Copy, Clone, PartialEq, Default)]
pub struct Position {
/// The current/primary node this entity is at or traveling from
pub node: NodeId,
@@ -29,10 +29,13 @@ pub struct Position {
}
/// Explicit movement state - only for entities that can move.
#[derive(Component, Debug, Clone, Copy, PartialEq)]
#[derive(Component, Debug, Clone, Copy, PartialEq, Default)]
pub enum MovementState {
#[default]
Stopped,
Moving { direction: Direction },
Moving {
direction: Direction,
},
}
/// Movement capability and parameters - only for entities that can move.
@@ -83,15 +86,6 @@ impl Position {
}
}
impl Default for Position {
fn default() -> Self {
Position {
node: 0,
edge_progress: None,
}
}
}
#[allow(dead_code)]
impl Position {
/// Returns `true` if the position is exactly at a node (not traveling).