From 48f64f715729defde9923cfeed9184ab976dd59d Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 12 Mar 2026 20:53:47 -0500 Subject: [PATCH] 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). --- crates/memofs/src/std_backend.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/memofs/src/std_backend.rs b/crates/memofs/src/std_backend.rs index 3558bb94..71c3135d 100644 --- a/crates/memofs/src/std_backend.rs +++ b/crates/memofs/src/std_backend.rs @@ -1,9 +1,12 @@ use std::path::{Path, PathBuf}; -use std::{collections::HashSet, io, thread}; +use std::{collections::HashSet, io}; use crossbeam_channel::Receiver; 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"))] use notify_debouncer_full::{new_debouncer, DebounceEventResult, Debouncer, RecommendedCache};