]> code.octet-stream.net Git - netwatcher/blobdiff - src/watch_win.rs
Make watching work on Linux
[netwatcher] / src / watch_win.rs
index a225f4a20c16c95f0cae051681345b21f0d96c15..edd2fe38d2f96587ed46cddb7b5fe714826317b0 100644 (file)
@@ -23,7 +23,7 @@ struct WatchState {
     /// The last result that we captured, for diffing
     prev_list: List,
     /// User's callback
-    cb: Box<dyn FnMut(Update) + 'static>,
+    cb: Box<dyn FnMut(Update) + Send + 'static>,
 }
 
 pub(crate) struct WatchHandle {
@@ -39,7 +39,7 @@ impl Drop for WatchHandle {
     }
 }
 
-pub(crate) fn watch_interfaces<F: FnMut(Update) + 'static>(
+pub(crate) fn watch_interfaces<F: FnMut(Update) + Send + 'static>(
     callback: F,
 ) -> Result<WatchHandle, Error> {
     let state = Box::pin(Mutex::new(WatchState {