mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-11 06:08:02 -06:00
chore: fix clippy warnings
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user