Repository navigation
Mechanical clippy cleanups - #1636
Merged
Merged
Conversation
Apply `clippy::uninlined_format_args` throughout: captured identifiers move into the format string instead of being passed positionally. No behavior change.
Apply `clippy::map_unwrap_or`: `.map(f).unwrap_or(x)` becomes `.map_or(x, f)` and `.map(f).unwrap_or_else(g)` becomes `.map_or_else(g, f)`. Both forms are exact equivalents, so this is a pure line-count reduction. A handful of sites are left alone because the combined form would need unique access to the same receiver from two closures at once.
Apply the control-flow half of clippy's pedantic set: `manual_let_else`, `single_match_else`, `redundant_else` and `needless_continue`. Two-arm matches whose fallback diverges become `let ... else` bindings, `else` blocks after a diverging `if` lose their nesting level, and redundant `continue` statements go away. Where clippy's rewrite would have been a step backwards the original shape is kept: two sites whose fallback produces a value stay as `match`, and one site is left alone because rustfmt does not reach a fixed point on the rewritten expression.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Apply `clippy::redundant_clone` and `clippy::cloned_instead_of_copied`: values that are already owned stop being cloned, and iterator adapters over `Copy` elements use `copied()` instead of `cloned()`. Fewer allocations, same results.
sbillig
force-pushed
the
simplify-lints
branch
from
September 29, 2026 18:17
833d770 to
05ce0f4
Compare
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.
Four behavior-preserving clippy passes. Net -566 lines.
uninlined_format_args)map/unwrap_orchains (map_unwrap_or) —.map(f).unwrap_or(x)becomes.map_or(x, f)manual_let_else,single_match_else,redundant_else,needless_continue)redundant_clone,cloned_instead_of_copied)