Skip to content

Commit a008b31

Browse files
committed
No need for phanton data
1 parent 3d24df2 commit a008b31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/timer.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ fn test(tim: pac::TIM16) {
568568

569569
struct BasicTimer<T> {
570570
_ptr: usize,
571-
real_timer: PhantomData<T>,
571+
real_timer: T,
572572
}
573573

574574
impl<T> Deref for BasicTimer<T> {
@@ -584,7 +584,7 @@ impl From<pac::TIM6> for BasicTimer<pac::TIM6> {
584584
fn from(tim: pac::TIM6) -> Self {
585585
Self {
586586
_ptr: unsafe { pac::TIM6::ptr() as _ },
587-
real_timer: PhantomData,
587+
real_timer: tim,
588588
}
589589
}
590590
}

0 commit comments

Comments
 (0)