Skip to content
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

Extend if_then_some_else_none to also suggest bool::then_some #9289

Merged
merged 2 commits into from
Aug 12, 2022

Conversation

mkrasnitski
Copy link
Contributor

Closes #9094.

changelog: Extend if_then_some_else_none to also suggest bool::then_some

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @xFrednet (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 4, 2022
Copy link
Member

@xFrednet xFrednet left a comment

Choose a reason for hiding this comment

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

Looks good to me. As a suggestion, could you mention bool:then_some in the lint description? The current example suggests bool::then which could/should be bool::then_some. As another change, you could just mention bool::then_some in the "Why is this bad?" section. Something like:

For simple calculation and known values you can also use bool::then_some which is eagerly avaluated in comparison to bool:then.

Otherwise, this is ready to merge. 👍 Thank you for the contribution and patience 🙃

@mkrasnitski
Copy link
Contributor Author

Thanks for the review! I've pushed some changes to the lint's description.

@xFrednet
Copy link
Member

Perfect, thank you for the implementation and quick follow up. I hope you had fun while working on Clippy 🙃

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 12, 2022

📌 Commit f7f60b8 has been approved by xFrednet

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Aug 12, 2022

⌛ Testing commit f7f60b8 with merge 05fc1c7...

@bors
Copy link
Collaborator

bors commented Aug 12, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: xFrednet
Pushing 05fc1c7 to master...

@bors bors merged commit 05fc1c7 into rust-lang:master Aug 12, 2022
@mkrasnitski mkrasnitski deleted the 9094 branch August 12, 2022 14:04
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.

none_else_block
5 participants