]> git.lizzy.rs Git - rust.git/commitdiff
Reordered match arms
authorNathan West <Lucretiel@users.noreply.github.com>
Tue, 18 Dec 2018 01:43:52 +0000 (17:43 -0800)
committerGitHub <noreply@github.com>
Tue, 18 Dec 2018 01:43:52 +0000 (17:43 -0800)
src/libstd/io/mod.rs

index d89c6af5b0b50b0f7e77187559592331d8f2eae9..e102cb499303dff4228575457d72b479a3d1c2cd 100644 (file)
@@ -1957,9 +1957,9 @@ fn next(&mut self) -> Option<Result<u8>> {
         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)),
             };
         }