]> code.octet-stream.net Git - netwatcher/blobdiff - src/watch_mac.rs
Make some error cases more specific
[netwatcher] / src / watch_mac.rs
index de0e65024c27c8b912832a4775f7ac7413d38833..42e7217ad46a09f33c1ce9277da588ce6ac283e9 100644 (file)
@@ -42,7 +42,9 @@ pub(crate) struct WatchHandle {
 
 impl Drop for WatchHandle {
     fn drop(&mut self) {
 
 impl Drop for WatchHandle {
     fn drop(&mut self) {
-        unsafe { nw_path_monitor_cancel(self.path_monitor); }
+        unsafe {
+            nw_path_monitor_cancel(self.path_monitor);
+        }
     }
 }
 
     }
 }
 
@@ -83,7 +85,5 @@ pub(crate) fn watch_interfaces<F: FnMut(Update) + Send + 'static>(
         nw_path_monitor_set_queue(path_monitor, queue);
         nw_path_monitor_start(path_monitor);
     }
         nw_path_monitor_set_queue(path_monitor, queue);
         nw_path_monitor_start(path_monitor);
     }
-    Ok(WatchHandle {
-        path_monitor,
-    })
+    Ok(WatchHandle { path_monitor })
 }
 }