diff options
Diffstat (limited to 'usbh/src/pipe.rs')
-rw-r--r-- | usbh/src/pipe.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usbh/src/pipe.rs b/usbh/src/pipe.rs index 75923ba..e84b898 100644 --- a/usbh/src/pipe.rs +++ b/usbh/src/pipe.rs @@ -345,7 +345,7 @@ pub(crate) enum USBPipeType { } pub(crate) struct DataBuf<'a> { - pub(crate) ptr: *const u8, + pub(crate) ptr: *mut u8, pub(crate) len: usize, _marker: core::marker::PhantomData<&'a ()>, } @@ -363,10 +363,10 @@ impl core::fmt::Debug for DataBuf<'_> { } } -impl<'a, T> From<&'a T> for DataBuf<'a> { - fn from(v: &'a T) -> Self { +impl<'a, T> From<&'a mut T> for DataBuf<'a> { + fn from(v: &'a mut T) -> Self { Self { - ptr: v as *const T as *const u8, + ptr: v as *mut T as *mut u8, len: core::mem::size_of::<T>(), _marker: core::marker::PhantomData, } |