mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-10-29 21:30:54 +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