Skip to content

Commit 2c23b90

Browse files
committed
Comment updates
1 parent 2d22c77 commit 2c23b90

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/libstd/io/buffered.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ impl<W: Write> Write for BufWriter<W> {
730730
// Normally, `write_all` just calls `write` in a loop. We can do better
731731
// by calling `self.get_mut().write_all()` directly, which avoids
732732
// round trips through the buffer in the event of a series of partial
733-
// writes.
733+
// writes in some circumstances.
734734
if self.buf.len() + buf.len() > self.buf.capacity() {
735735
self.flush_buf()?;
736736
}
@@ -1116,9 +1116,6 @@ impl<'a, W: Write> Write for LineWriterShim<'a, W> {
11161116
/// writer, it will also flush the existing buffer if it contains any
11171117
/// newlines, even if the incoming data does not contain any newlines.
11181118
fn write_all(&mut self, buf: &[u8]) -> io::Result<()> {
1119-
// The default `write_all` calls `write` in a loop; we can do better
1120-
// by simply calling self.inner().write_all directly. This avoids
1121-
// round trips to `self.buffer` in the event of partial writes.
11221119
let newline_idx = match memchr::memrchr(b'\n', buf) {
11231120
// If there are no new newlines (that is, if this write is less than
11241121
// one line), just do a regular buffered write

0 commit comments

Comments
 (0)