-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Add Option::filter()
according to RFC 2124
#44996
Add Option::filter()
according to RFC 2124
#44996
Conversation
ac912e4
to
88c94e7
Compare
Thanks for the PR @LukasKalbertodt! I've set @sfackler as the reviewer for the PR but have set it as "with author" for now until the RFC gets merged - assuming it does, we can than get this reviewed and merged. |
In fact, I think I'll close this PR for now as I don't see the RFC being merged in the next week - once it is, please ping me and I'll reopen and we can get your PR reviewed :) (this is just so PR triagers aren't constantly visiting this PR and checking to see where the RFC is up to) |
@aidanhs Sure! Sorry for opening this PR too soon, I expected the RFC to be merged earlier :) |
@aidanhs The RFC has been merged and I inserted the correct tracking issue id into the code. This PR can be opened again :) |
Option::filter()
according to RFC 2124Option::filter()
according to RFC 2124
😕 It may be easier to just submit a new PR (isaacs/github#361). |
Oopsie. Okay dokey! |
…r=dtolnay Add `Option::filter()` according to RFC 2124 (*old PR: rust-lang#44996) This is the implementation of [RFC "Add `Option::filter` to the standard library"](rust-lang/rfcs#2124). Tracking issue: rust-lang#45860 **Questions for code reviewers:** - Is the documentation sufficiently long? - Is the documentation easy enough to understand? - Is the position of the new method (after `and_then()`) a good one?
This is the implementation of the not yet accepted RFC "Add
Option::filter
to the standard library". However, the feedback on the RFC is very good so far and I think it's rather unlikely the RFC will be rejected.TODO:
option_filter
) #45860) and add issue number to "unstable" attributeQuestions for code reviewers:
and_then()
) a good one?