diff options
author | Tim Oram <dev@mitmaro.ca> | 2019-10-04 11:03:49 -0230 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-04 11:03:49 -0230 |
commit | ab379e3a8209138325f1f4ee91315dd7f9479e14 (patch) | |
tree | 103e4aaff62151b4d81d7d4585ea52beba466685 | |
parent | 29d9c13dd27abe80bdc6916bb782a25c210091cc (diff) | |
parent | a7d6b4bb5205164a6c2a3000146541cbae26ff40 (diff) |
Merge pull request #175 from MitMaro/tim/fix-clippy-error
Fix bad usage of unwrap inside is_some
-rw-r--r-- | src/input/input_handler.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input/input_handler.rs b/src/input/input_handler.rs index ea7ad73..2c5e459 100644 --- a/src/input/input_handler.rs +++ b/src/input/input_handler.rs @@ -91,8 +91,8 @@ impl<'i> InputHandler<'i> { fn get_next_input(&self) -> PancursesInput { loop { let c = self.display.getch(); - if c.is_some() { - break c.unwrap(); + if let Some(input) = c { + break input; } } } |