Skip to content

Commit 6988d69

Browse files
committed
Copy dest should be unfilled of ReadBuf
Signed-off-by: Sean Pianka <pianka@eml.cc>
1 parent fbbf97e commit 6988d69

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/reader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl PipeReader {
5858
fn copy_data_into_buffer(&self, data: &Data, buf: &mut ReadBuf) -> usize {
5959
let len = data.len.min(buf.capacity());
6060
unsafe {
61-
ptr::copy_nonoverlapping(data.ptr, buf.filled_mut().as_mut_ptr(), len);
61+
ptr::copy_nonoverlapping(data.ptr, buf.initialize_unfilled().as_mut_ptr(), len);
6262
}
6363
len
6464
}

0 commit comments

Comments
 (0)