diff --git a/src/os/shared.rs b/src/os/shared.rs index eca3eee..7be9583 100644 --- a/src/os/shared.rs +++ b/src/os/shared.rs @@ -40,10 +40,7 @@ pub struct TerminalEvents; impl Iterator for TerminalEvents { type Item = Event; fn next(&mut self) -> Option { - match read() { - Ok(ev) => Some(ev), - Err(_) => None, - } + read().ok() } }