From a2723e34a126d767906abb7461ad50fac2f38910 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Mon, 6 Jul 2026 12:59:40 +0000 Subject: [PATCH] style: rustfmt drift from the AMF/watchdog commits `cargo fmt --all --check` (a CI gate) failed on main: config.rs (the new `zerocopy: val(...).map { !matches!(...) }` from 8fb1264) and punktfunk1.rs (the `reset_stalled_encoder` conditions from 06d594b) were left unwrapped by the pinned rustfmt. Pure reformat, no semantic change. Co-Authored-By: Claude Opus 4.8 --- crates/punktfunk-host/src/config.rs | 5 ++++- crates/punktfunk-host/src/punktfunk1.rs | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/crates/punktfunk-host/src/config.rs b/crates/punktfunk-host/src/config.rs index 90e8a90..db5c1b3 100644 --- a/crates/punktfunk-host/src/config.rs +++ b/crates/punktfunk-host/src/config.rs @@ -89,7 +89,10 @@ impl HostConfig { .and_then(|s| s.parse::().ok()) .unwrap_or(2), zerocopy: val("PUNKTFUNK_ZEROCOPY").map(|s| { - !matches!(s.trim().to_ascii_lowercase().as_str(), "0" | "false" | "off" | "no") + !matches!( + s.trim().to_ascii_lowercase().as_str(), + "0" | "false" | "off" | "no" + ) }), ten_bit: flag("PUNKTFUNK_10BIT"), four_four_four: flag("PUNKTFUNK_444"), diff --git a/crates/punktfunk-host/src/punktfunk1.rs b/crates/punktfunk-host/src/punktfunk1.rs index 9afc159..96ee03c 100644 --- a/crates/punktfunk-host/src/punktfunk1.rs +++ b/crates/punktfunk-host/src/punktfunk1.rs @@ -3586,7 +3586,8 @@ fn virtual_stream(ctx: SessionContext) -> Result<()> { // (bounded) instead of killing an otherwise healthy session; a backend without an // in-place rebuild keeps today's fail-fast behavior. encoder_resets += 1; - if encoder_resets > MAX_ENCODER_RESETS || !reset_stalled_encoder(&mut enc, &mut inflight) + if encoder_resets > MAX_ENCODER_RESETS + || !reset_stalled_encoder(&mut enc, &mut inflight) { return Err(e).context("encoder submit"); } @@ -3710,7 +3711,8 @@ fn virtual_stream(ctx: SessionContext) -> Result<()> { ), }; encoder_resets += 1; - if encoder_resets > MAX_ENCODER_RESETS || !reset_stalled_encoder(&mut enc, &mut inflight) + if encoder_resets > MAX_ENCODER_RESETS + || !reset_stalled_encoder(&mut enc, &mut inflight) { return Err(poll_err.unwrap_or_else(|| anyhow!("{why}"))) .context("encoder stalled — in-place rebuild unavailable or exhausted");