1
Fork 0

Reordered match arms

This commit is contained in:
Nathan West 2018-12-17 17:43:52 -08:00 committed by GitHub
parent 7c05ef5db0
commit a1790e8c20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1957,9 +1957,9 @@ impl<R: Read> Iterator for Bytes<R> {
let mut byte = 0;
loop {
return match self.inner.read(slice::from_mut(&mut byte)) {
Err(ref e) if e.kind() == ErrorKind::Interrupted => continue,
Ok(0) => None,
Ok(..) => Some(Ok(byte)),
Err(ref e) if e.kind() == ErrorKind::Interrupted => continue,
Err(e) => Some(Err(e)),
};
}