From 39889c31025894a70e0814e746c01150a871415b Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Mon, 6 Jul 2026 10:49:45 +0000 Subject: [PATCH] fix(host): silence write-only cur_node_id on non-Linux encoder builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cur_node_id (the capture 5-tuple's node id, added for the Linux dedicated- game-exit check) is read only under #[cfg(target_os = "linux")], so on the Windows nvenc/amf-qsv build it was assigned but never read — failing `clippy -D warnings`. Read it on non-Linux platforms (the `let _ = &launch` idiom already used in this file). Co-Authored-By: Claude Opus 4.8 --- crates/punktfunk-host/src/punktfunk1.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/punktfunk-host/src/punktfunk1.rs b/crates/punktfunk-host/src/punktfunk1.rs index 393d3e6..5b9fffb 100644 --- a/crates/punktfunk-host/src/punktfunk1.rs +++ b/crates/punktfunk-host/src/punktfunk1.rs @@ -3387,6 +3387,11 @@ fn virtual_stream(ctx: SessionContext) -> Result<()> { // library instead of surfacing a failure — rather than the capture-loss rebuild + 40 s // timeout. Gated to the dedicated bare-spawn launch (`launch_is_nested`), so a normal // Bazzite/desktop capture loss still rebuilds in place. + // `cur_node_id` (the capture 5-tuple's node id) is read only by the Linux + // dedicated-game-exit check below; keep it read on other platforms so it isn't a + // write-only variable under `-D warnings` (the `let _ = &launch` idiom above). + #[cfg(not(target_os = "linux"))] + let _ = &cur_node_id; #[cfg(target_os = "linux")] if launch.is_some() && crate::vdisplay::launch_is_nested(compositor)