We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 71d8d81 + f802233 commit ede2f42Copy full SHA for ede2f42
std/src/io/buffered/bufreader/buffer.rs
@@ -122,7 +122,7 @@ impl Buffer {
122
123
/// Remove bytes that have already been read from the buffer.
124
pub fn backshift(&mut self) {
125
- self.buf.copy_within(self.pos.., 0);
+ self.buf.copy_within(self.pos..self.filled, 0);
126
self.filled -= self.pos;
127
self.pos = 0;
128
}
0 commit comments