) {
let state_ptr = ctx as *const Mutex<WatchState>;
unsafe {
- let state_guard = &mut *state_ptr.as_ref().unwrap().lock().unwrap();
+ let state_guard = &mut *state_ptr.as_ref()
+ .expect("callback ctx should never be null")
+ .lock()
+ .unwrap();
handle_notif(state_guard);
}
}