derive try_into_packet automatically
This commit is contained in:
parent
8116375fd0
commit
5ecb84ed16
9 changed files with 102 additions and 100 deletions
|
@ -36,7 +36,10 @@ impl ByteSlice {
|
|||
unsafe { std::slice::from_raw_parts(self.start, self.length) }
|
||||
}
|
||||
|
||||
#[allow(clippy::mut_from_ref, reason = "This is used to get a pointer from the C side")]
|
||||
#[allow(
|
||||
clippy::mut_from_ref,
|
||||
reason = "This is used to get a pointer from the C side."
|
||||
)]
|
||||
pub(crate) unsafe fn as_slice_mut(&self) -> &mut [u8] {
|
||||
unsafe { std::slice::from_raw_parts_mut(self.start, self.length) }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue