-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
suggests is_some_and
over map().unwrap
#11030
Conversation
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. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
apologies for the slightly questionably git history. dogfood was failing because please let me know if there is a better way to get around the too many arguments warning. |
@Centri3 Do you want to take over the review for this PR? :) |
Sure, I'll take a look in a bit :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good overall, I've left some small comments. Thanks! :D
if the msrv is not >= 1.70 then the `map_or` is suggested instead of `is_some_and` (even when `unwrap_or` returns false)
was previously failing due to `check` having to many arguments.
…o a tuple" This reverts commit 7b91844.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thank you :)
@bors r=Centri3,xFrednet
Well bors is still asleep. But, @darklyspaced, I do believe you need to run Once that's been ran, I'll try reapproving again :D (also if there's no changes ^^) |
Thank you! @bors r=Centri3,xFrednet |
cc: @blyxyas this might also be interesting for you :) |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
changelog: Enhancement: [
option_map_unwrap_or
] now considers the [msrv
] config when creating the suggestion.Option<T>
is mapped to anOption<bool>
with false being used whenNone
is detected; suggests the use ofis_some_and
insteadis_some_and
was stabilisedfixes #9125