Rollup merge of #155741 - xtqqczze:question-mark-bufwriter-flush, r=WaffleLapkin

std: Refactor BufWriter::flush to use the `?` operator

Functionally, this is equivalent and may     be slightly more amenable to inlining.
This commit is contained in:
Jonathan Brouwer
2026-04-25 00:08:11 +02:00
committed by GitHub
+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()
}
}