diff --git a/src/input.rs b/src/input.rs
index 5c8ecf4666a8560bba2ccc907856f74a8a84febc..2d0aeb6b1ba27a92628d182fc72912a275836a93 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -19,7 +19,7 @@ impl<R: Read> Iterator for Keys<R> {
             match self.iter.next() {
                 Some(Ok(Event::Key(k))) => return Some(Ok(k)),
                 Some(Ok(_)) => continue,
-                e @ Some(Err(_)) => e,
+                Some(Err(e)) => return Some(Err(e)),
                 None => return None,
             };
         }