1
Fork 0

Address reviewer comments

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron 2022-08-11 15:52:29 +01:00
parent 1a2122fff0
commit ac70aea985
18 changed files with 74 additions and 55 deletions

View file

@ -93,7 +93,7 @@ impl Buffer {
if self.pos >= self.filled {
debug_assert!(self.pos == self.filled);
let mut buf: BorrowedBuf<'_> = (&mut *self.buf).into();
let mut buf = BorrowedBuf::from(&mut *self.buf);
// SAFETY: `self.filled` bytes will always have been initialized.
unsafe {
buf.set_init(self.filled);