Skip to content

Commit 9185196

Browse files
Address review comments
1 parent 3ea49b7 commit 9185196

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

nrf-hal-common/src/usbd.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1+
use core::marker::PhantomData;
2+
13
use crate::clocks::ExternalOscillator;
24
use crate::pac::USBD;
35
use crate::Clocks;
46

57
pub use nrf_usbd::Usbd;
68

7-
#[allow(dead_code)] // fields are unused and only hold ownership
89
pub struct UsbPeripheral<'a> {
9-
usbd: USBD,
10-
clocks: &'a (),
10+
_usbd: USBD,
11+
_clocks: PhantomData<&'a ()>,
1112
}
1213

1314
impl<'a> UsbPeripheral<'a> {
1415
pub fn new<L, LSTAT>(usbd: USBD, _clocks: &'a Clocks<ExternalOscillator, L, LSTAT>) -> Self {
15-
Self { usbd, clocks: &() }
16+
Self {
17+
_usbd: usbd,
18+
_clocks: PhantomData,
19+
}
1620
}
1721
}
1822

0 commit comments

Comments
 (0)