diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-11-14 09:51:12 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-11-14 09:51:12 -0500 |
| commit | 7b78c39cb604961564b1d4e0a491eafacc85e8cb (patch) | |
| tree | 8618f2a4fc76a389bcabdeb94ff46ab6d74b1d77 /dungeon/src/lib.rs | |
| parent | dungeon: refactor manual drop (diff) | |
| download | DungeonCrawl-7b78c39cb604961564b1d4e0a491eafacc85e8cb.tar.gz DungeonCrawl-7b78c39cb604961564b1d4e0a491eafacc85e8cb.tar.bz2 DungeonCrawl-7b78c39cb604961564b1d4e0a491eafacc85e8cb.zip | |
Enable more clippy lints
Diffstat (limited to 'dungeon/src/lib.rs')
| -rw-r--r-- | dungeon/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dungeon/src/lib.rs b/dungeon/src/lib.rs index 0021e81..b96cb83 100644 --- a/dungeon/src/lib.rs +++ b/dungeon/src/lib.rs @@ -74,7 +74,7 @@ impl Dungeon { /// Returns the current position of the camera (viewer) #[must_use] - pub fn camera(&self) -> FPos { + pub const fn camera(&self) -> FPos { self.player.entity.fpos } @@ -86,7 +86,7 @@ impl Dungeon { /// Returns the random number gen for the `Floor` #[must_use] - pub fn rng(&mut self) -> &mut SmallRng { + pub const fn rng(&mut self) -> &mut SmallRng { &mut self.rng } @@ -136,7 +136,7 @@ impl Dungeon { } fn act_non_players(&mut self, delta_time: f32) { - for enemy in self.enemies.iter_mut() { + for enemy in &mut self.enemies { enemy.handle_movement( self.player.entity.pos, &self.floor, |