-
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
Suggest is_some_and
for map(<f>).unwrap_or(false)
#10102
Conversation
This reverts commit 015a3f2.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @dswij (or someone else) soon. Please see the contribution instructions for more information. |
I had help from @xFrednet in getting started with conributing to Clippy |
Hey, awesome to see a PR for this! I've just noticed that this suggestion requires the Usually, we use It looks like, the CI is currently failing, as the doc comment also requires the feature. It should work if you add it in the markdown code block. It would be good, if you could also add a comment saying that this feature is required for the I'll wait for an answer on Zulip, until I do a full review. You're welcome to reach out if you need any help :) r? @xFrednet |
Coming back from zulip, the code you are looking for to check for a library feature is: cx
.tcx
.sess
.features_untracked()
.declared_lib_features
.iter()
.any(|(name, _span)| name.as_str() == "is_some_and") |
@xFrednet Check! Sounds useful to learn how to do that. Will do soon (tm). |
I'll mark this as waiting on author. GitHub will notify me when there are any updates. Enjoy the festive season! @rustbot author |
Hey @TheCodingWombat, this is a small ping from triage. Do you think you'll have time to continue this PR? 🙃 |
☔ The latest upstream changes (presumably #10163) made this pull request unmergeable. Please resolve the merge conflicts. |
Hey, I will closes this PR due to inactivity. This was already a very good start and I will link it in the issue for further development. If you have the time, @TheCodingWombat you're more than welcome to pick the issue up again. Thank you for the work you did in this PR :) |
@rustbot label -S-inactive-closed |
This is my first PR and contribution to Clippy.
changelog:
map_unwrap_or
: Added suggestingis_some_and
when patternOption.map(<f>).unwrap_or(false)
occurs.This is a first step in fixing all suggestions in issue #9125.