Skip to content

fix(audio): satisfy clippy 1.98 chunks_exact_to_as_chunks in channel_repair - #249

Open
thewrz wants to merge 2 commits into
mainfrom
fix/clippy-198-as-chunks
Open

fix(audio): satisfy clippy 1.98 chunks_exact_to_as_chunks in channel_repair#249
thewrz wants to merge 2 commits into
mainfrom
fix/clippy-198-as-chunks

Conversation

@thewrz

@thewrz thewrz commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

This was written agentically; verify its assertions:

Why

CI pins dtolnay/rust-toolchain@stable, now Rust 1.98. Its new clippy::chunks_exact_to_as_chunks lint fires under -D warnings at three sites in src/audio/channel_repair.rs, so the Lint (clippy + fmt) job is red for every open PR (first seen on #246, which touches no Rust). main last ran CI on 2026-08-02, pre-1.98, and fails the same way today.

What

Replace chunks_exact(2) / chunks_exact_mut(2) with as_chunks::<2>().0 / as_chunks_mut::<2>().0 at the three sites. as_chunks is stable since 1.88 (MSRV is 1.89) and drops the trailing remainder exactly as chunks_exact did, so behaviour is unchanged. Local toolchain is 1.97 (lint not yet present), so the CI Lint job is the proof for the lint itself.

Testing

  • cargo fmt -- --check
  • cargo clippy --all-targets --all-features -- -D warnings (1.97 locally)
  • cargo test — 827 passed, 0 failed
  • CI Lint job green on 1.98

🤖 Co-authored by Claude Fable 5. Closes #248.

…repair

CI tracks the stable toolchain, now Rust 1.98, whose new clippy::chunks_exact_to_as_chunks lint fails the Lint job on every PR. Swap the three constant-size chunks_exact calls for as_chunks::<2>() (stable since 1.88, within MSRV 1.89); remainder handling is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thewrz thewrz added bug Something isn't working audio PipeWire, decode, playback ci CI and workflow changes labels Aug 22, 2026
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e35ecbc9-dced-4494-8ad7-2ba3e173e126

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

The --all-targets clippy gate also lints integration tests; one more constant-size chunks_exact in tests/decoder_test.rs fired the same lint.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thewrz

thewrz commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

This was written agentically; verify its assertions:

Adversarial review receipt

  • Reviewer: provider=openai; model=gpt-5.6-terra; effort=xhigh; mode=cross-provider (reason: n/a)
  • Counts: P1=0; P2=0; total=0
  • Confirmed finding: none confirmed

🤖 Co-authored by Claude Fable 5.

@thewrz
thewrz marked this pull request as ready for review August 22, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audio PipeWire, decode, playback bug Something isn't working ci CI and workflow changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: clippy 1.98 chunks_exact_to_as_chunks fails Lint job on every PR

1 participant