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.
1 parent 9562c01 commit 7c5a895Copy full SHA for 7c5a895
library/std/src/io/copy.rs
@@ -103,7 +103,7 @@ impl<I: Write> BufferedCopySpec for BufWriter<I> {
103
return Ok(len);
104
}
105
106
- init = read_buf.initialized_len();
+ init = read_buf.initialized_len() - bytes_read;
107
108
// SAFETY: ReadBuf guarantees all of its filled bytes are init
109
unsafe { buf.set_len(buf.len() + bytes_read) };
0 commit comments