Enable more clippy lints (part 2/3) - #25080
Draft
emilk wants to merge 6 commits into
Draft
Conversation
`String::new()` instead of `"".to_string()` / `"".to_owned()` / `"".into()`, which skips the copy-from-empty-slice path. All sites fixed by `cargo clippy --fix`.
`Ok(())` instead of `Ok(_)` where the payload is `()`, so the pattern stops matching silently if the type ever gains a payload.
Dropped `else` blocks after a branch that already diverges, removing one level of indentation at each site.
Nested the or-patterns, e.g. `Time32(Microsecond) | Time32(Nanosecond)` -> `Time32(Microsecond | Nanosecond)`, so the shared prefix is written once.
`if`/`else` instead of `match` on a bool. Two sites cascaded into `redundant_else`, fixed in the same commit.
Manual `Debug` impls that skip a field now end in `finish_non_exhaustive()`, so the output says a field was omitted instead of implying the struct only has the ones listed. `Column` keeps `finish()` under an `#[expect]`: its `Debug` output appears verbatim in user-facing error messages.
This was referenced Sep 8, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #25080 +/- ##
==========================================
- Coverage 81.74% 81.74% -0.01%
==========================================
Files 1128 1128
Lines 416644 416631 -13
Branches 416644 416631 -13
==========================================
- Hits 340592 340576 -16
- Misses 55995 56006 +11
+ Partials 20057 20049 -8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Which issue does this PR close?
Clippychecks in CI #18467.Rationale for this change
Part 2 of 3, split out of #24848. Stacked on part 1, so review that first:
Turn on more
clippy::pedanticlints from the opt-out list inCargo.toml.What changes are included in this PR?
One commit per lint, each removing its
"allow"line fromCargo.tomlandfixing every site. Review one commit at a time!
Let me know if you disagree with any and I'll revert it.
unnested_or_patternsTime32(Microsecond | Nanosecond)instead of repeating the prefixmatch_boolif/elseinstead ofmatchon a boolmissing_fields_in_debugfinish_non_exhaustive()on manualDebugimpls that skip a fieldWhat is the testing strategy for this PR?
Clippy is clean both with
--all-featuresand with default features. Thechanges are mechanical, so no new tests.
Are there any user-facing changes?
No