Make clone_unchecked work

This commit is contained in:
Grant Miller 2024-09-21 07:52:54 -05:00
parent df06c2bbfe
commit f2646b29a6
2 changed files with 2 additions and 4 deletions

View File

@ -201,9 +201,7 @@ impl<'d, T: CoreInstance> Timer<'d, T> {
} }
pub(crate) unsafe fn clone_unchecked(&self) -> ManuallyDrop<Self> { pub(crate) unsafe fn clone_unchecked(&self) -> ManuallyDrop<Self> {
// this doesn't work for some reason let tim = unsafe { self.tim.clone_unchecked() };
// let tim = unsafe { self.tim.clone_unchecked() };
let tim = todo!();
ManuallyDrop::new(Self { tim }) ManuallyDrop::new(Self { tim })
} }

View File

@ -67,7 +67,7 @@ impl State {
} }
} }
trait SealedInstance: RccPeripheral { trait SealedInstance: RccPeripheral + Peripheral<P = Self> {
/// Async state for this timer /// Async state for this timer
fn state() -> &'static State; fn state() -> &'static State;
} }