diff --git a/nrf-hal-common/src/usbd.rs b/nrf-hal-common/src/usbd.rs index 9557d045..42b666cf 100644 --- a/nrf-hal-common/src/usbd.rs +++ b/nrf-hal-common/src/usbd.rs @@ -1,18 +1,22 @@ +use core::marker::PhantomData; + use crate::clocks::ExternalOscillator; use crate::pac::USBD; use crate::Clocks; pub use nrf_usbd::Usbd; -#[allow(dead_code)] // fields are unused and only hold ownership pub struct UsbPeripheral<'a> { - usbd: USBD, - clocks: &'a (), + _usbd: USBD, + _clocks: PhantomData<&'a ()>, } impl<'a> UsbPeripheral<'a> { pub fn new(usbd: USBD, _clocks: &'a Clocks) -> Self { - Self { usbd, clocks: &() } + Self { + _usbd: usbd, + _clocks: PhantomData, + } } }