fix: gate macOS-only imports behind cfg(target_os = "macos")

CI clippy runs with -D warnings on Linux where `thread` and `Watcher`
are unused (only used in the macOS raw-notify path).
This commit is contained in:
Joe 2026-03-12 20:53:47 -05:00
parent b16f3bf500
commit 48f64f7157

View file

@ -1,9 +1,12 @@
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::{collections::HashSet, io, thread}; use std::{collections::HashSet, io};
use crossbeam_channel::Receiver; use crossbeam_channel::Receiver;
use notify::event::{CreateKind, EventKind, ModifyKind, RemoveKind, RenameMode}; use notify::event::{CreateKind, EventKind, ModifyKind, RemoveKind, RenameMode};
use notify::{RecursiveMode, Watcher}; use notify::RecursiveMode;
#[cfg(target_os = "macos")]
use {notify::Watcher, std::thread};
#[cfg(not(target_os = "macos"))] #[cfg(not(target_os = "macos"))]
use notify_debouncer_full::{new_debouncer, DebounceEventResult, Debouncer, RecommendedCache}; use notify_debouncer_full::{new_debouncer, DebounceEventResult, Debouncer, RecommendedCache};