fix(host/rtsp): scope the HDR mut allow so Windows clippy stays green

`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 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 10:36:32 +02:00
co-authored by Claude Opus 4.8
parent 232b41e88b
commit 2123e4e580
@@ -406,6 +406,9 @@ fn stream_config(map: &HashMap<String, String>) -> Option<StreamConfig> {
// 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!(