Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 8787868

Browse files
committed
io: Avoid Avoid marking bytes as uninit in BufReader::peek
1 parent 2feb911 commit 8787868

File tree

1 file changed

+0
-1
lines changed
  • library/std/src/io/buffered/bufreader

1 file changed

+0
-1
lines changed

library/std/src/io/buffered/bufreader/buffer.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ impl Buffer {
123123
/// Remove bytes that have already been read from the buffer.
124124
pub fn backshift(&mut self) {
125125
self.buf.copy_within(self.pos.., 0);
126-
self.initialized -= self.pos;
127126
self.filled -= self.pos;
128127
self.pos = 0;
129128
}

0 commit comments

Comments
 (0)