From ea469162f9ad95484a5e8f274e11857b39b8634c Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Sat, 1 Aug 2026 01:30:45 +0200 Subject: [PATCH] fix(docs): three doc comments start a markdown list they never meant to MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Windows clippy on the v0.23.0 tag: `doc_lazy_continuation` in crates/pf-client-core/src/audio_wasapi.rs:37. The cause is one line break — `+ wire cost.` begins a line, so the markdown parser reads `+` as a bullet marker and the following line becomes a lazy continuation of that list item. Fixed by reflowing so the `+` is mid-line rather than by taking clippy's suggested indent: indenting would keep the accidental bullet in the rendered docs, which is the actual defect. Same treatment for the two siblings a sweep of every `///` line found, both invisible to the Linux gate for their own reasons: - gamestream/audio.rs:237 — `+ libopus;` at line start, on the cfg(not(linux/windows)) stub, so only a macOS clippy would ever see it. - mgmt/tests.rs:1653 — `404.` at line start IS an ordered-list marker (CommonMark: 1-9 digits + `.`), and it is behind cfg(test), so only an --all-targets run sees it. This is the [[Windows clippy sees what the Linux gate structurally cannot]] shape again: audio_wasapi.rs is cfg(windows), so no amount of Linux CI would have caught it. Verified: a scanner over every .rs doc comment in the tree now reports zero line-initial list markers with an unindented continuation; rustfmt clean (it does not reflow doc comments, so these edits are stable). --- crates/pf-client-core/src/audio_wasapi.rs | 6 +++--- crates/punktfunk-host/src/gamestream/audio.rs | 7 ++++--- crates/punktfunk-host/src/mgmt/tests.rs | 9 +++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/crates/pf-client-core/src/audio_wasapi.rs b/crates/pf-client-core/src/audio_wasapi.rs index 170a8256..2df9f3b8 100644 --- a/crates/pf-client-core/src/audio_wasapi.rs +++ b/crates/pf-client-core/src/audio_wasapi.rs @@ -32,9 +32,9 @@ const SAMPLE_RATE: usize = 48_000; /// Mic capture requests STEREO from WASAPI (autoconvert matrixes any endpoint layout down to /// it — the proven path; `read_from_device_to_deque` then delivers our requested format) and /// downmixes to MONO in code before the encoder: voice is mono at the source, the host accepts -/// any Opus channel layout (its stereo decoder upmixes), and half the samples halve the encode -/// + wire cost. The render path is multichannel — its channel count + block align are runtime, -/// driven by the host-resolved layout. +/// any Opus channel layout (its stereo decoder upmixes), and half the samples halve the +/// encode + wire cost. The render path is multichannel — its channel count + block align are +/// runtime, driven by the host-resolved layout. const CAPT_CHANNELS: usize = 2; /// Mic frames are 10 ms (480 mono samples) — any size ≤ 120 ms is fine host-side; 10 ms /// halves the frame-fill share of mouth-to-ear latency vs the old 20 ms. diff --git a/crates/punktfunk-host/src/gamestream/audio.rs b/crates/punktfunk-host/src/gamestream/audio.rs index 96ad2535..2a2e1cff 100644 --- a/crates/punktfunk-host/src/gamestream/audio.rs +++ b/crates/punktfunk-host/src/gamestream/audio.rs @@ -234,9 +234,10 @@ pub fn start( }); } -/// Stub — the audio plane needs an audio-capture backend (PipeWire on Linux, WASAPI on Windows) -/// + libopus; this keeps the remaining targets (e.g. macOS) compiling (crate doc: "the crate -/// compiles everywhere"). Reports failure the same way the real stream thread does: clears `running`. +/// Stub — the audio plane needs an audio-capture backend (PipeWire on Linux, WASAPI on +/// Windows) + libopus; this keeps the remaining targets (e.g. macOS) compiling (crate doc: +/// "the crate compiles everywhere"). Reports failure the same way the real stream thread +/// does: clears `running`. #[cfg(not(any(target_os = "linux", target_os = "windows")))] pub fn start( running: std::sync::Arc, diff --git a/crates/punktfunk-host/src/mgmt/tests.rs b/crates/punktfunk-host/src/mgmt/tests.rs index 37a12b11..256774fe 100644 --- a/crates/punktfunk-host/src/mgmt/tests.rs +++ b/crates/punktfunk-host/src/mgmt/tests.rs @@ -1649,10 +1649,11 @@ async fn hooks_get_shape_and_put_validation() { // ------------------------------------------------------------------ library scanners -/// The scanner list is platform-shaped and read-only-safe; the toggle rejects unknown ids with -/// 404. (A successful toggle PUT would write the developer's real `library-scanners.json`, so the -/// write path is exercised only through the unknown-id rejection here — the settings round-trip -/// itself is unit-tested in `library::scanners` against pure shapes.) +/// The scanner list is platform-shaped and read-only-safe; the toggle rejects unknown ids +/// with 404. (A successful toggle PUT would write the developer's real +/// `library-scanners.json`, so the write path is exercised only through the unknown-id +/// rejection here — the settings round-trip itself is unit-tested in `library::scanners` +/// against pure shapes.) #[tokio::test] async fn library_scanner_list_and_unknown_toggle() { let app = test_app(test_state(), None);