fix(audio): satisfy clippy 1.98 chunks_exact_to_as_chunks in channel_repair - #249
Open
thewrz wants to merge 2 commits into
Open
fix(audio): satisfy clippy 1.98 chunks_exact_to_as_chunks in channel_repair#249thewrz wants to merge 2 commits into
thewrz wants to merge 2 commits into
Conversation
…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>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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>
Collaborator
Author
|
This was written agentically; verify its assertions: Adversarial review receipt
🤖 Co-authored by Claude Fable 5. |
thewrz
marked this pull request as ready for review
August 22, 2026 20:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was written agentically; verify its assertions:
Why
CI pins
dtolnay/rust-toolchain@stable, now Rust 1.98. Its newclippy::chunks_exact_to_as_chunkslint fires under-D warningsat three sites insrc/audio/channel_repair.rs, so the Lint (clippy + fmt) job is red for every open PR (first seen on #246, which touches no Rust).mainlast ran CI on 2026-08-02, pre-1.98, and fails the same way today.What
Replace
chunks_exact(2)/chunks_exact_mut(2)withas_chunks::<2>().0/as_chunks_mut::<2>().0at the three sites.as_chunksis stable since 1.88 (MSRV is 1.89) and drops the trailing remainder exactly aschunks_exactdid, 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 -- --checkcargo clippy --all-targets --all-features -- -D warnings(1.97 locally)cargo test— 827 passed, 0 failed🤖 Co-authored by Claude Fable 5. Closes #248.