Address review comments.

This commit is contained in:
Nicholas Nethercote 2022-01-20 09:59:30 +11:00
parent 416399dc10
commit 37fbd91eb5
5 changed files with 9 additions and 11 deletions

View file

@ -2296,7 +2296,6 @@ impl crate::Decoder for Decoder {
for c in s.iter_mut() {
*c = self.read_u8();
}
()
}
fn read_enum<T, F>(&mut self, f: F) -> T

View file

@ -676,11 +676,10 @@ impl<'a> serialize::Decoder for Decoder<'a> {
}
#[inline]
fn read_raw_bytes_into(&mut self, s: &mut [u8]) -> () {
fn read_raw_bytes_into(&mut self, s: &mut [u8]) {
let start = self.position;
self.position += s.len();
s.copy_from_slice(&self.data[start..self.position]);
()
}
}