Skip to content

CI clippy fails on Rust 1.100: allow needless_range_loop for the workspace - #99

Open
marcin-koziol wants to merge 1 commit into
BurningTreeC:mainfrom
marcin-koziol:clippy-1-100
Open

marcin-koziol wants to merge 1 commit into
BurningTreeC:mainfrom
marcin-koziol:clippy-1-100

Conversation

@marcin-koziol

Copy link
Copy Markdown

CI's fmt · clippy · test job installs the latest stable Rust. With Rust 1.100, clippy fails on main:

error: the loop variable `n` is used to index `self.solve`
   --> crates/faderframe-core/src/ambisonics.rs:568:18

needless_range_loop now also flags loops whose index walks several buffers at once. That is 48 places, almost all for c in 0..channels loops in the devices' DSP code that read input, write output and update per-channel state with the same c. Rewriting them as zipped iterators would read worse and risks mistakes in the audio code. So this allows the lint in [workspace.lints.clippy], with a comment saying why.

With this and #85 (rustfmt 1.100), cargo +1.100.0 clippy --workspace --all-targets -- -D warnings passes.

Cargo 1.100 also warns about a few unused dependencies (tracing in faderframe-audio and faderframe-project, thiserror in faderframe-script, serde in faderframe-speech, faderframe-core in faderframe-timeline). Those are cargo's warnings, not clippy's, so they don't fail CI. I left them alone, because some may be used only on another platform.

🤖 Generated with Claude Code

Clippy 1.100 widened needless_range_loop to loops whose index also walks
other buffers, which flags 48 channel loops in the DSP code. Rewriting
them as zipped iterators reads worse there, so the lint is allowed for
the workspace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants