Skip to content

Conversation

y21
Copy link
Member

@y21 y21 commented Sep 17, 2023

A tiny improvement to the redundant_guards lint. There's no associated issue for this, just noticed it while going through the code.
Right now it warns on Some(x) if x == 2 and suggests Some(2), but it didn't do that for Some(x) if 2 == x (i.e. when the local is on the right side and the pattern on the left side).

changelog: [redundant_guards]: also lint if the pattern is on the left side

@rustbot
Copy link
Collaborator

rustbot commented Sep 17, 2023

r? @giraffate

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Sep 17, 2023
@giraffate
Copy link
Contributor

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Sep 20, 2023

📌 Commit 558ae4c has been approved by giraffate

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 20, 2023

⌛ Testing commit 558ae4c with merge c556695...

@bors
Copy link
Contributor

bors commented Sep 21, 2023

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: giraffate
Pushing c556695 to master...

@bors bors merged commit c556695 into rust-lang:master Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants