[Clippy] Fix clippy issues in examples code#1293
Merged
weihanglo merged 13 commits intoJul 16, 2026
Merged
Conversation
…les/add.rs Simplify `run()` to remove the needless borrow.
Simplify `run()` to remove the explicit dereferences.
Simplify `print()` to use `checked_div()`.
Simplify `print_stats()` to remove the explicit dereference.
…les/diff.rs Simplify `run()` to remove the needless borrows.
Simplify `resolve_blob()` to use the tuple variant `Some` rather than using a closure.
Simplify `parse_shared()` using `str::strip_prefix()`.
Simplify `run()` using `str::strip_prefix()`.
…ff.rs Simplify `log_message_matches()` to remove the needless borrow.
Simplify `do_merge()` and `run()` to remove the needless borrows.
Simplify `do_fetch()` to avoid wrapping the result of `?` in an `Ok()`, just return the result from `Repository::reference_to_annotated_commit()` directly.
Simplify `run()` using `str::strip_prefix()`.
Simplify `run()` to remove the explicit dereference.
weihanglo
approved these changes
Jul 16, 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.
Commits are split by file and lint for ease of review.
Covers the code in the
examples/directory.None of the issues required keeping the old code with an
#[expect]attribute, they could all be fixed.