diff --git a/src/input.rs b/src/input.rs index 0095f50..1f207d2 100644 --- a/src/input.rs +++ b/src/input.rs @@ -69,9 +69,9 @@ impl>> Iterator for Keys { Some(Ok(c @ '\x01' ... '\x1A')) => Some(Key::Ctrl((c as u8 - 0x1 + b'a') as char)), Some(Ok(c @ '\x1C' ... '\x1F')) => Some(Key::Ctrl((c as u8 - 0x1C + b'4') as char)), None => None, - Some('\0') => Some(Key::Null), + Some(Ok('\0')) => Some(Key::Null), Some(Ok(c)) => Some(Key::Char(c)), - Some(Err(e)) => Some(Key::Error(e)), + Some(Err(e)) => Some(Key::Error(io::Error::new(io::ErrorKind::InvalidData, e))), } } }