fix warning on unused import
This commit is contained in:
parent
3f45ec6ead
commit
6b9470be2c
1 changed files with 1 additions and 2 deletions
|
@ -1,4 +1,3 @@
|
|||
use core::mem;
|
||||
use core::task::{RawWaker, RawWakerVTable, Waker};
|
||||
|
||||
use super::{wake_task, TaskHeader, TaskRef};
|
||||
|
@ -38,7 +37,7 @@ pub fn task_from_waker(waker: &Waker) -> TaskRef {
|
|||
// This is not really guaranteed because the structs are `repr(Rust)`, it is
|
||||
// indeed the case in the current implementation.
|
||||
// TODO use waker_getters when stable. https://github.com/rust-lang/rust/issues/96992
|
||||
let hack: &WakerHack = unsafe { mem::transmute(waker) };
|
||||
let hack: &WakerHack = unsafe { core::mem::transmute(waker) };
|
||||
if hack.vtable != &VTABLE {
|
||||
panic!("Found waker not created by the Embassy executor. `embassy_time::Timer` only works with the Embassy executor.")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue