Enable more clippy lints - #24566
Open
emilk wants to merge 9 commits into
Open
Conversation
Remove a dead `let _expected = …` binding left over from a removed assertion. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Compare the file extension with `Path::extension()` instead of
`str::ends_with(".csv")`.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
All five hits are FFI local-bypass tests that downcast a trait object to its concrete type with a pointer cast. The casts are aligned, so mark them with targeted `#[expect]` attributes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Turn quoted doc links into real intra-doc links where a target exists, and wrap array examples and SQL snippets in backticks or text code fences. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Change internal fn parameters and return types from `&Option<T>` to `Option<&T>`, updating callers to pass `.as_ref()`. Also changes the public `apply_masking` in datafusion-substrait, which forwards from a flagged internal fn. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop `continue` expressions that end a loop iteration anyway, flattening the surrounding `match`/`if` where that reads better. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Use `Iterator::copied`/`Option::copied` instead of `cloned` for `Copy` types. Applied with `cargo clippy --fix`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop semicolons after `match`/`if` expressions in tail position. Applied with `cargo clippy --fix`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Drop trailing commas after single-item non-tuple parens/brackets. Applied with `cargo clippy --fix`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
emilk
marked this pull request as ready for review
August 21, 2026 17:41
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #24566 +/- ##
==========================================
+ Coverage 81.34% 81.37% +0.02%
==========================================
Files 1117 1117
Lines 397528 398005 +477
Branches 397528 398005 +477
==========================================
+ Hits 323385 323857 +472
- Misses 55225 55227 +2
- Partials 18918 18921 +3 ☔ 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
Continuing #24466: turn on more
clippy::pedanticlints (opt-out list inCargo.toml).What changes are included in this PR?
One commit per lint, each removing its
"allow"line fromCargo.tomland fixing every site. Review one commit at a time!
Let me know if you disagree with any and I'll revert it
no_effect_underscore_bindinglet _expected = …bindingcase_sensitive_file_extension_comparisonsPath::extension()instead ofstr::ends_with(".csv")cast_ptr_alignment#[expect]on FFI tests that downcast to a concrete, aligned typedoc_link_with_quotesref_option&Option<T>params/returns changed toOption<&T>needless_continuecontinues that already ended the loop iterationcloned_instead_of_copiedcopied()instead ofcloned()forCopytypesunnecessary_semicolonmatch/ifunnecessary_trailing_commaThe
ref_optioncommit also changes the signature of the publicapply_maskingfn indatafusion-substrait(&Option<MaskExpression>->Option<&MaskExpression>), since it forwards to an internal fn that was flagged.Are these changes tested?
cargo clippy --workspace --all-targets --all-featuresreports nowarnings. The changes are mechanical and behavior-preserving, so no new
tests.
Are there any user-facing changes?
The
ref_optioncommit changes the publicapply_maskingsignature indatafusion-substrait, see above.