From 9a58746aa59a1f6d8516fa3e560050c7c6809164 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Thu, 2 Jul 2026 17:31:45 +0000 Subject: [PATCH] fix(host/windows): clippy while_let_loop in the async poll drain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rebase onto main picked up the pre-fix loop{match} variant of the async retrieve drain — the exact shape the Windows clippy gate rejects (run 6722 failed on it; the while-let form passed run 6724 on the CI branch). Restore the gated form. Co-Authored-By: Claude Fable 5 --- .../punktfunk-host/src/encode/windows/nvenc.rs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/crates/punktfunk-host/src/encode/windows/nvenc.rs b/crates/punktfunk-host/src/encode/windows/nvenc.rs index 4179c0a..6e12782 100644 --- a/crates/punktfunk-host/src/encode/windows/nvenc.rs +++ b/crates/punktfunk-host/src/encode/windows/nvenc.rs @@ -1174,17 +1174,13 @@ impl Encoder for NvencD3d11Encoder { // the oldest ready AU. `None` = nothing completed yet — the session loop keeps the frame // in flight and re-polls next tick, capture never blocks on the WDDM scheduling wait. if self.async_rt.is_some() { - loop { - let done = match self - .async_rt - .as_mut() - .expect("checked just above") - .done_rx - .try_recv() - { - Ok(d) => d, - Err(_) => break, - }; + while let Ok(done) = self + .async_rt + .as_mut() + .expect("checked just above") + .done_rx + .try_recv() + { self.absorb_done(done)?; } return Ok(self