🐛 Unbreak CI on the current stable Rust - #32
Merged
Conversation
The Windows and macOS legs have been failing on master. Neither is a change in this project: Rust 1.98 added `clippy::chunks_exact_to_as_chunks`, and CI runs `dtolnay/rust-toolchain@stable` with `-D warnings`, so a new lint in a toolchain release fails the build with nothing having been pushed. Two sites, one per platform, which is why the Linux leg stayed green — neither compiles there: src/source/firmware.rs:190 buf.chunks_exact(4) (Windows, ACPI) src/source/macos/dvfs.rs:80 bytes.chunks_exact(8) (macOS, pmgr states) Both now use `as_chunks::<N>()`, the replacement the lint itself suggests. Semantics are identical — the trailing partial chunk is dropped either way — and the firmware one gets slightly simpler on the way, since `as_chunks` yields `&[u8; 4]` and the signature converts without re-indexing. `slice::as_chunks` has been stable since Rust 1.88, well below this crate's declared `rust-version = "1.95"`, so the floor does not move. Verified with `cargo clippy --all-targets -- -D warnings` and the full test suite on Windows. The macOS site cannot be compiled here, so its expression was type-checked standalone and asserted to drop a trailing partial pair exactly as `chunks_exact` did — but the macOS leg of CI is what actually proves it. Note that local clippy could not reproduce this at all: this machine is on 1.97.1 and the lint arrived in 1.98. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 26, 2026
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.
What broke
Nothing in this project. Rust 1.98 added
clippy::chunks_exact_to_as_chunks, and CI runsdtolnay/rust-toolchain@stablewith-D warnings— so a lint introduced by a toolchain release fails the build with nothing having been pushed.Two sites, one per platform — which is exactly why the Linux leg stayed green, since neither compiles there:
src/source/firmware.rs:190—buf.chunks_exact(4)src/source/macos/dvfs.rs:80—bytes.chunks_exact(8)pmgrvoltage states)The fix
Both use
as_chunks::<N>(), the replacement the lint itself suggests. Semantics are identical — the trailing partial chunk is dropped either way. The firmware site gets slightly simpler on the way, sinceas_chunksyields&[u8; 4]and the signature converts without re-indexing:The MSRV floor does not move.
slice::as_chunkshas been stable since Rust 1.88; this crate declaresrust-version = "1.95".Verification
cargo clippy --all-targets -- -D warnings -D clippy::await_holding_lock— exit 0 on Windows.chunks_exactdid (2 whole pairs from 19 bytes, remainder dropped). The macOS leg of CI is what actually proves it.One thing worth recording: local clippy could not reproduce this at all. This machine is on rustc 1.97.1 and the lint arrived in 1.98 — so the failure was only visible from the CI logs, not from a local run.
Worth considering separately
This will recur.
-D warningsagainst a floatingstabletoolchain means any future clippy release can turn CI red without a commit. Options are pinning the toolchain, or splitting the lint gate into a non-blocking job — a policy call rather than something to decide inside a fix.🤖 Generated with Claude Code