Skip to content

Commit 7a6a12b

Browse files
committed
Tidy fixes
1 parent f7650fe commit 7a6a12b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/libstd/io/buffered.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,11 +1363,7 @@ mod tests {
13631363
// rustfmt-on-save.
13641364
impl Read for ShortReader {
13651365
fn read(&mut self, _: &mut [u8]) -> io::Result<usize> {
1366-
if self.lengths.is_empty() {
1367-
Ok(0)
1368-
} else {
1369-
Ok(self.lengths.remove(0))
1370-
}
1366+
if self.lengths.is_empty() { Ok(0) } else { Ok(self.lengths.remove(0)) }
13711367
}
13721368
}
13731369

@@ -1795,7 +1791,7 @@ mod tests {
17951791

17961792
match self.max_writes {
17971793
Some(0) if self.error_after_max_writes => {
1798-
return Err(io::Error::new(io::ErrorKind::Other, "test - max_writes"))
1794+
return Err(io::Error::new(io::ErrorKind::Other, "test - max_writes"));
17991795
}
18001796
Some(0) => return Ok(0),
18011797
Some(ref mut count) => *count -= 1,

0 commit comments

Comments
 (0)