diff --git a/src/fsevent.rs b/src/fsevent.rs index 3989c323..af124842 100644 --- a/src/fsevent.rs +++ b/src/fsevent.rs @@ -457,7 +457,7 @@ impl FsEventWatcher { fs::FSEventStreamInvalidate(stream); fs::FSEventStreamRelease(stream); } - }); + })?; // block until runloop has been sent self.runloop = Some((rl_rx.recv().unwrap().0, thread_handle)); diff --git a/src/inotify.rs b/src/inotify.rs index e622266f..c930be64 100644 --- a/src/inotify.rs +++ b/src/inotify.rs @@ -128,7 +128,7 @@ impl EventLoop { // Run the event loop. pub fn run(self) { - thread::Builder::new() + let _ = thread::Builder::new() .name("notify-rs inotify".to_string()) .spawn(|| self.event_loop_thread()); } @@ -420,7 +420,7 @@ impl EventLoop { let event_loop_tx = self.event_loop_tx.clone(); let waker = self.event_loop_waker.clone(); let cookie = rename_event.tracker().unwrap(); // unwrap is safe because rename_event is always set with some cookie - thread::Builder::new() + let _ = thread::Builder::new() .name("notify-rs inotify rename".to_string()) .spawn(move || { thread::sleep(Duration::from_millis(10)); // wait up to 10 ms for a subsequent event diff --git a/src/kqueue.rs b/src/kqueue.rs index b16bc6fa..6c4c338d 100644 --- a/src/kqueue.rs +++ b/src/kqueue.rs @@ -76,7 +76,7 @@ impl EventLoop { // Run the event loop. pub fn run(self) { - thread::Builder::new() + let _ = thread::Builder::new() .name("notify-rs kqueue".to_string()) .spawn(|| self.event_loop_thread()); } diff --git a/src/poll.rs b/src/poll.rs index d5df4fb2..a2f74836 100644 --- a/src/poll.rs +++ b/src/poll.rs @@ -76,7 +76,7 @@ impl PollWatcher { let event_handler = self.event_handler.clone(); let event_handler = move |res| emit_event(&event_handler, res); - thread::Builder::new() + let _ = thread::Builder::new() .name("notify-rs poll".to_string()) .spawn(move || { // In order of priority: diff --git a/src/windows.rs b/src/windows.rs index 617f03f7..3c007be6 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -84,7 +84,7 @@ impl ReadDirectoryChangesServer { let (action_tx, action_rx) = unbounded(); // it is, in fact, ok to send the semaphore across threads let sem_temp = wakeup_sem as u64; - thread::Builder::new() + let _ = thread::Builder::new() .name("notify-rs windows".to_string()) .spawn(move || { let wakeup_sem = sem_temp as HANDLE; diff --git a/tests/race-with-remove-dir.rs b/tests/race-with-remove-dir.rs index 98fd463f..c25d93e0 100644 --- a/tests/race-with-remove-dir.rs +++ b/tests/race-with-remove-dir.rs @@ -10,7 +10,7 @@ fn test_race_with_remove_dir() { { let tmpdir = tmpdir.path().to_path_buf(); - thread::Builder::new() + let _ = thread::Builder::new() .name("notify-rs test-race-with-remove-dir".to_string()) .spawn(move || { let mut watcher = notify::recommended_watcher(move |result| {