diff options
author | Joris | 2022-02-26 22:23:34 +0100 |
---|---|---|
committer | Joris | 2022-02-26 22:23:34 +0100 |
commit | 01a1e5e4f45dc80cd430d18492817b733fab5603 (patch) | |
tree | fa39d7abaf04d9b805a19767c088f7d61eecb509 /src/util/event.rs | |
parent | 4ff3fa15967d989658804b94e1ce035dfd3e5a5c (diff) |
Fix linter warnings
Diffstat (limited to 'src/util/event.rs')
-rw-r--r-- | src/util/event.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/util/event.rs b/src/util/event.rs index 33ee9ec..05d8581 100644 --- a/src/util/event.rs +++ b/src/util/event.rs @@ -43,12 +43,10 @@ impl Events { let tx = tx.clone(); thread::spawn(move || { let stdin = io::stdin(); - for evt in stdin.keys() { - if let Ok(key) = evt { - if let Err(err) = tx.send(Event::Input(key)) { - eprintln!("{}", err); - return; - } + for key in stdin.keys().flatten() { + if let Err(err) = tx.send(Event::Input(key)) { + eprintln!("{}", err); + return; } } }) |