-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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::expect_none(msg) and unwrap_none() #62596
Conversation
These are `Option` analogues to `Result::expect_err` and `unwrap_err`.
r? @rkruppe (rust_highfive has picked a reviewer for you, use r? to override) |
Code LGTM. I'm always unsure about policy wrt small unstable library addition, should there be some sign-off from T-libs too? |
I think it's laid back until stabilization, but we can ping @rust-lang/libs... |
Yes we are generally pretty lax so long as 2 people (author/reviewer) think it should go in libstd it can land as unstable, and then we have stricter requirements for stabilizing. This seems like it still falls in that bucket at least to me. |
Cool, thanks for clarifying! @bors r+ |
📌 Commit 74c8d98 has been approved by |
Add Option::expect_none(msg) and unwrap_none() These are `Option` analogues to `Result::expect_err` and `unwrap_err`.
☀️ Test successful - checks-azure |
☔ The latest upstream changes made this pull request unmergeable. Please resolve the merge conflicts. |
These are
Option
analogues toResult::expect_err
andunwrap_err
.