Merge branch 'bubble-read-errors' into 'master'

Make the keys return their inner error, if any.

See merge request redox-os/termion!162
This commit is contained in:
Jeremy Soller 2019-07-09 01:56:22 +00:00
commit c27678efc2
1 changed files with 1 additions and 1 deletions

View File

@ -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,
};
}