diff --git a/core-foundation/src/runloop.rs b/core-foundation/src/runloop.rs index 5655535..ccc1f78 100644 --- a/core-foundation/src/runloop.rs +++ b/core-foundation/src/runloop.rs @@ -125,8 +125,9 @@ mod test { let run_loop_timer = CFRunLoopTimer::new(now + 0.20f64, 0f64, 0, 0, timer_popped, &mut context); - run_loop.add_timer(&run_loop_timer, kCFRunLoopDefaultMode); - + unsafe { + run_loop.add_timer(&run_loop_timer, kCFRunLoopDefaultMode); + } CFRunLoop::run_current(); }