fix: satisfy clippy on current stable - #18
Merged
Conversation
sfnt_checksum used chunks_exact(4) with try_into().unwrap(). Newer clippy rejects a constant chunk size in favour of as_chunks, which also drops the unwrap. CI pins dtolnay/rust-toolchain@stable while this machine was on 1.97.1, so the lint did not exist locally and the clippy job had been failing on every push since the subsetting work landed. Verified against 1.98.0.
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.
The
clippyjob has been failing on every push since #11, and I missed it — I was reading the tail ofgh pr checks, which showed passing rows and cut off the failure.sfnt_checksum(added with font subsetting in #11) usedchunks_exact(4)plustry_into().unwrap(). Current clippy wantsas_chunks::<4>(), which also removes the unwrap.Why it wasn't caught locally
CI pins
dtolnay/rust-toolchain@stable; this machine was on 1.97.1 (July), where the lint does not exist. Local gate green, CI red.Fixed by installing a matching toolchain —
/usr/local/rustupis root-owned, so it neededRUSTUP_HOMEpointed at writable space, the same problemCARGO_HOMEhad. Now on 1.98.0, andcargo clippy --features serve -- -D warningsexits 0.What was actually affected
Only the lint gate.
fmtand all threetestjobs passed throughout, andrelease.ymlruns neither clippy nor tests — it builds and packages — so the published v1.4.0 and v1.5.0 binaries are unaffected and correct. Nothing needs republishing.Affected merges: #11, #12, #13, #14, #15, #16, #17.
Gate re-run on 1.98.0: fmt, clippy, 324 tests all green.