From fca0753781988f036f2fcbd4d12328624a1536e6 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Tue, 2 Jun 2026 00:34:14 +0200 Subject: [PATCH] fix: gate desktop features for no-default-features build --- src/app.rs | 2 +- src/mime_app.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index b8846de..a4af64b 100644 --- a/src/app.rs +++ b/src/app.rs @@ -6777,8 +6777,8 @@ impl Application for App { }, ) }), + #[cfg(feature = "desktop")] Subscription::run(|| { - eprintln!("loading mime app watcher"); stream::channel( 1, |mut output: futures::channel::mpsc::Sender| async move { diff --git a/src/mime_app.rs b/src/mime_app.rs index 706c80d..c543afa 100644 --- a/src/mime_app.rs +++ b/src/mime_app.rs @@ -6,6 +6,7 @@ use bstr::{BString, ByteSlice, ByteVec}; use cosmic::desktop; use cosmic::widget; pub use mime_guess::Mime; +#[cfg(feature = "desktop")] use notify_debouncer_full::notify; use rustc_hash::FxHashMap; use std::ffi::OsStr; @@ -16,6 +17,7 @@ use std::sync::{Arc, atomic}; use std::time::{self, Instant}; use std::{fs, io, process}; +#[cfg(feature = "desktop")] pub async fn watch(mut emitter: impl FnMut() + 'static + Send) { let watcher_result = notify_debouncer_full::new_debouncer( time::Duration::from_millis(250),