mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-24 15:52:34 +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> {
|
||||
// this doesn't work for some reason
|
||||
// let tim = unsafe { self.tim.clone_unchecked() };
|
||||
let tim = todo!();
|
||||
let tim = unsafe { self.tim.clone_unchecked() };
|
||||
ManuallyDrop::new(Self { tim })
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ impl State {
|
||||
}
|
||||
}
|
||||
|
||||
trait SealedInstance: RccPeripheral {
|
||||
trait SealedInstance: RccPeripheral + Peripheral<P = Self> {
|
||||
/// Async state for this timer
|
||||
fn state() -> &'static State;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user