Amend #1 to use direct integers instead of byte chars

This commit is contained in:
Ticki 2016-03-08 11:29:22 +01:00
parent 899cb89139
commit f601c49e28
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ impl<R: Read> ReadExt for R {
for c in self.bytes() {
match c {
Err(_) => return Err(TerminalError::StdinError),
Ok(b'\0') | Ok(b'\x03') | Ok(b'\x04') => return Ok(None),
Ok(0) | Ok(3) | Ok(4) => return Ok(None),
Ok(b'\n') | Ok(b'\r') => return Ok(Some(string)),
Ok(c) => string.push(c as char),
}