std: Refactor flush method in BufWriter to use the ? operator

This commit is contained in:
xtqqczze
2026-04-24 15:19:36 +01:00
parent 9ec5d5f32e
commit 15e60ebe6e
+2 -1
View File
@@ -641,7 +641,8 @@ fn is_write_vectored(&self) -> bool {
}
fn flush(&mut self) -> io::Result<()> {
self.flush_buf().and_then(|()| self.get_mut().flush())
self.flush_buf()?;
self.get_mut().flush()
}
}