mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 00:02:28 +00:00
Make clone_unchecked work
This commit is contained in:
parent
df06c2bbfe
commit
f2646b29a6
@ -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 })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user