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

@@ -47,7 +47,7 @@ impl Read for Empty {
}
#[inline]
fn read_buf(&mut self, _cursor: BorrowedCursor<'_, '_>) -> io::Result<()> {
fn read_buf(&mut self, _cursor: BorrowedCursor<'_>) -> io::Result<()> {
Ok(())
}
}
@@ -130,7 +130,7 @@ impl Read for Repeat {
Ok(buf.len())
}
fn read_buf(&mut self, mut buf: BorrowedCursor<'_, '_>) -> io::Result<()> {
fn read_buf(&mut self, mut buf: BorrowedCursor<'_>) -> io::Result<()> {
// SAFETY: No uninit bytes are being written
for slot in unsafe { buf.as_mut() } {
slot.write(self.byte);