From 82cefedab9e44b48f4d3cc08b0f6e002ae383c9d Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sat, 3 Aug 2019 13:14:28 -0400 Subject: Fix a bunch more Clippy lints, but disable in Circle The unused error is causing more trouble than it's worth at this point --- src/game.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/game.rs') 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 { 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>( -- cgit 1.4.1