diff options
Diffstat (limited to 'src/game.rs')
-rw-r--r-- | src/game.rs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/game.rs b/src/game.rs index add48e8bfd47..2c69061516fd 100644 --- a/src/game.rs +++ b/src/game.rs @@ -69,7 +69,7 @@ impl PromptResolution { use PromptResolution::*; match self { Cancellable(complete) => complete.cancel(), - Uncancellable(complete) => {} + Uncancellable(_complete) => {} } } } @@ -200,12 +200,10 @@ impl<'a> Game<'a> { fn collision_at(&self, pos: Position) -> Option<Collision> { if !pos.within(self.viewport.inner) { Some(Collision::Stop) + } else if self.creatures_at(pos).is_empty() { + None } else { - if self.creatures_at(pos).is_empty() { - None - } else { - Some(Collision::Combat) - } + Some(Collision::Combat) } } @@ -305,7 +303,7 @@ impl<'a> Game<'a> { } /// Step the game forward the given number of ticks - fn tick(&mut self, ticks: Ticks) {} + fn tick(&mut self, _ticks: Ticks) {} /// Get a message from the global map based on the rng in this game fn message<'params>( |