Provide copy-free access to raw Decoder bytes
This commit is contained in:
parent
da3b2ca956
commit
2098ea6eba
5 changed files with 12 additions and 21 deletions
|
@ -485,12 +485,12 @@ macro_rules! implement_ty_decoder {
|
|||
read_f64 -> f64;
|
||||
read_f32 -> f32;
|
||||
read_char -> char;
|
||||
read_str -> Cow<'_, str>;
|
||||
read_str -> &str;
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn read_raw_bytes_into(&mut self, bytes: &mut [u8]) {
|
||||
self.opaque.read_raw_bytes_into(bytes)
|
||||
fn read_raw_bytes(&mut self, len: usize) -> &[u8] {
|
||||
self.opaque.read_raw_bytes(len)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue