From 2123e4e5808fe7373455afcf0f6ee29af5eaec2b Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Sun, 19 Jul 2026 10:36:32 +0200 Subject: [PATCH] fix(host/rtsp): scope the HDR `mut` allow so Windows clippy stays green MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `let mut hdr` tripped -D unused_mut on Windows: the only reassignment is the GNOME colour-mode probe below it, which is #[cfg(target_os = "linux")]. Dropping `mut` would break the Linux build, so allow unused_mut on non-Linux only — the lint still fires on Linux if that probe is ever removed. Second Windows-only breakage in this release that the Linux CI cannot see (see also the ffmpeg_win swscale match): `cargo clippy --workspace` on the Linux runner never compiles cfg(windows) code, and the Windows job builds only punktfunk-host + punktfunk-tray. Verified: cargo clippy --release -p punktfunk-host --features nvenc,amf-qsv,qsv -- -D warnings on 192.168.1.173. Co-Authored-By: Claude Opus 4.8 --- crates/punktfunk-host/src/gamestream/rtsp.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/punktfunk-host/src/gamestream/rtsp.rs b/crates/punktfunk-host/src/gamestream/rtsp.rs index ad1b4cdf..2e646e98 100644 --- a/crates/punktfunk-host/src/gamestream/rtsp.rs +++ b/crates/punktfunk-host/src/gamestream/rtsp.rs @@ -406,6 +406,9 @@ fn stream_config(map: &HashMap) -> Option { // degrades to 8-bit SDR (and a Windows desktop that is ALREADY HDR still streams PQ // regardless, since the IDD-push capturer follows the display). let hdr_requested = parse_u("x-nv-video[0].dynamicRangeMode").unwrap_or(0) != 0; + // `mut` is load-bearing on Linux only — the GNOME colour-mode probe below clears it. Scope the + // allow to non-Linux so `unused_mut` still fires here if that probe ever goes away. + #[cfg_attr(not(target_os = "linux"), allow(unused_mut))] let mut hdr = hdr_requested && crate::gamestream::host_hdr_capable(); if hdr_requested && !hdr { tracing::warn!(