summaryrefslogtreecommitdiff
path: root/dungeon/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dungeon/src/lib.rs')
-rw-r--r--dungeon/src/lib.rs6
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,