Skip to content

or_fun_call: lint more methods #15071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

klensy
Copy link
Contributor

@klensy klensy commented Jun 17, 2025

Extend or_fun_call lint with new checks for Option::get_or_insert, Result::map_or.

changelog: [or_fun_call]: lint more methods

@rustbot
Copy link
Collaborator

rustbot commented Jun 17, 2025

r? @samueltardieu

rustbot has assigned @samueltardieu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jun 17, 2025
@klensy klensy changed the title Or fun call up or_fun_call: lint more methods Jun 17, 2025
Copy link
Contributor

@samueltardieu samueltardieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You applied the dogfood by hand, right? You missed two placed (clippy_lints/src/matches/redundant_pattern_match.rs line 276 and lintcheck/src/output.rs line 80).

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jun 17, 2025
@klensy
Copy link
Contributor Author

klensy commented Jun 17, 2025

You applied the dogfood by hand, right?

No, skipped ones didn't look as good suggestions to me.

@klensy
Copy link
Contributor Author

klensy commented Jun 17, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jun 17, 2025
@samueltardieu samueltardieu added the L-nursery Lint: Currently in the nursery group label Jun 19, 2025
@klensy klensy requested a review from samueltardieu June 20, 2025 10:21
Copy link
Contributor

@samueltardieu samueltardieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you squash the commits (except for the dogfood one)?

@samueltardieu
Copy link
Contributor

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Jun 20, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 20, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@klensy
Copy link
Contributor Author

klensy commented Jun 20, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L-nursery Lint: Currently in the nursery group 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.

3 participants