From 393b47a0623c2681682ff7c91929c64935b1fb32 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Thu, 16 Jul 2026 20:42:54 +0200 Subject: [PATCH] fix(tray): allow has_conflicts on non-Linux (Windows -D warnings dead-code) has_conflicts drives the Linux ksni backend's NeedsAttention state; the Windows tray surfaces the same conflict through the tooltip headline() (it has no distinct attention icon) and never calls the boolean, so `cargo clippy -p punktfunk-tray -- -D warnings` failed dead-code on Windows (windows-host.yml). Scope the allow to non-Linux rather than gate the shared API out. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/punktfunk-tray/src/status.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/punktfunk-tray/src/status.rs b/crates/punktfunk-tray/src/status.rs index c328baf3..bb825938 100644 --- a/crates/punktfunk-tray/src/status.rs +++ b/crates/punktfunk-tray/src/status.rs @@ -104,7 +104,11 @@ impl TrayStatus { } /// The host detected another Moonlight-compatible host (Sunshine/Apollo/…) on this machine — - /// unsupported side-by-side. Drives the tray's attention state. + /// unsupported side-by-side. Drives the Linux (ksni) backend's `NeedsAttention` state; the + /// Windows backend surfaces the same conflict through the tooltip `headline()` instead (it has + /// no distinct attention icon), so this accessor is unused there — allow it per-platform rather + /// than gate the shared API out. + #[cfg_attr(not(target_os = "linux"), allow(dead_code))] pub fn has_conflicts(&self) -> bool { matches!(self, TrayStatus::Running(s) if !s.conflicts.is_empty()) }