Skip to content

Commit 956c469

Browse files
committed
No need for phanton data
1 parent dd9d667 commit 956c469

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/timer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ fn test(tim: pac::TIM16) {
597597

598598
struct BasicTimer<T> {
599599
_ptr: usize,
600-
real_timer: PhantomData<T>,
600+
real_timer: T,
601601
}
602602

603603
impl<T> Deref for BasicTimer<T> {
@@ -613,7 +613,7 @@ impl From<pac::TIM6> for BasicTimer<pac::TIM6> {
613613
fn from(tim: pac::TIM6) -> Self {
614614
Self {
615615
_ptr: unsafe { pac::TIM6::ptr() as _ },
616-
real_timer: PhantomData,
616+
real_timer: tim,
617617
}
618618
}
619619
}

0 commit comments

Comments
 (0)