fix test failure from trying to assume_init too much
This commit is contained in:
parent
9562c01879
commit
7c5a895a89
@ -103,7 +103,7 @@ impl<I: Write> BufferedCopySpec for BufWriter<I> {
|
|||||||
return Ok(len);
|
return Ok(len);
|
||||||
}
|
}
|
||||||
|
|
||||||
init = read_buf.initialized_len();
|
init = read_buf.initialized_len() - bytes_read;
|
||||||
|
|
||||||
// SAFETY: ReadBuf guarantees all of its filled bytes are init
|
// SAFETY: ReadBuf guarantees all of its filled bytes are init
|
||||||
unsafe { buf.set_len(buf.len() + bytes_read) };
|
unsafe { buf.set_len(buf.len() + bytes_read) };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user