added default to terminal input polling

This commit is contained in:
epi
2020-11-01 07:45:18 -06:00
parent 39f8f38204
commit 95aca72670

View File

@@ -30,7 +30,7 @@ fn terminal_input_handler() {
log::trace!("enter: terminal_input_handler");
loop {
if event::poll(Duration::from_millis(SLEEP_DURATION)).unwrap() {
if event::poll(Duration::from_millis(SLEEP_DURATION)).unwrap_or(false) {
// It's guaranteed that the `read()` won't block when the `poll()`
// function returns `true`