Fix clippy errors#301
Merged
Merged
Conversation
Collapses the inner `if` into the outer `match` arm as a guard, removing the unneeded `mut`. Fixes clippy::collapsible_match: https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_match
PendingNode::value() and PendingEntry::value() unnecessarily required mutable access. Changed both to take &self to fix clippy errors at call sites where `entry` is bound as an immutable reference, causing: "cannot borrow immutable local variable `entry` as mutable" on service.rs line:623. Fixes clippy::collapsible_match: https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_match
Fixes clippy::collapsible_match: https://rust-lang.github.io/rust-clippy/rust-1.95.0/index.html#collapsible_match
jxs
approved these changes
Apr 28, 2026
jxs
left a comment
Member
There was a problem hiding this comment.
LGTM Akihito, we are touching public API's which I feel don't need to be public, let's address that on a future PR before releasing a new minor version
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.
Description
This PR fixes the following clippy errors:
It also removes unnecessary
mutusages in:Note: in b13cb7c, changed
PendingNode::value()andPendingEntry::value()were updated to avoid requiring mutable access unnecessarily. Previously, the following code caused a compilation error at service.rs:623:Notes & open questions
Change checklist