Merge pull request #1173 from parasyte/fix-timer-callback-type

Fix timer callback type
This commit is contained in:
Cobrand
2021-12-02 13:25:26 +01:00
committed by GitHub
+1 -1
View File
@@ -88,7 +88,7 @@ impl<'b, 'a> Drop for Timer<'b, 'a> {
}
extern "C" fn c_timer_callback(_interval: u32, param: *mut c_void) -> u32 {
let f = param as *mut std::boxed::Box<dyn std::ops::Fn() -> u32>;
let f = param as *mut TimerCallback<'_>;
unsafe { (*f)() }
}