const ENCODING: Encoding = usize::ENCODING;
}
+unsafe impl Send for WatchHandle {}
+
#[link(name = "Network", kind = "framework")]
extern "C" {
fn nw_path_monitor_create() -> NwPathMonitorT;
impl Drop for WatchHandle {
fn drop(&mut self) {
- unsafe { nw_path_monitor_cancel(self.path_monitor); }
+ unsafe {
+ nw_path_monitor_cancel(self.path_monitor);
+ }
}
}
nw_path_monitor_set_queue(path_monitor, queue);
nw_path_monitor_start(path_monitor);
}
- Ok(WatchHandle {
- path_monitor,
- })
+ Ok(WatchHandle { path_monitor })
}