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

Add Option::expect_none(msg) and unwrap_none() #62596

Merged
merged 3 commits into from
Jul 17, 2019

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Jul 11, 2019

These are Option analogues to Result::expect_err and unwrap_err.

These are `Option` analogues to `Result::expect_err` and `unwrap_err`.
@rust-highfive
Copy link
Collaborator

r? @rkruppe

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 11, 2019
@cuviper
Copy link
Member Author

cuviper commented Jul 11, 2019

src/libcore/option.rs Outdated Show resolved Hide resolved
src/libcore/option.rs Outdated Show resolved Hide resolved
@hanna-kruppe
Copy link
Contributor

Code LGTM. I'm always unsure about policy wrt small unstable library addition, should there be some sign-off from T-libs too?

@cuviper
Copy link
Member Author

cuviper commented Jul 15, 2019

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...

@alexcrichton
Copy link
Member

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.

@hanna-kruppe
Copy link
Contributor

Cool, thanks for clarifying!

@bors r+

@bors
Copy link
Contributor

bors commented Jul 16, 2019

📌 Commit 74c8d98 has been approved by rkruppe

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 16, 2019
@bors
Copy link
Contributor

bors commented Jul 17, 2019

⌛ Testing commit 74c8d98 with merge d56128d...

bors added a commit that referenced this pull request Jul 17, 2019
Add Option::expect_none(msg) and unwrap_none()

These are `Option` analogues to `Result::expect_err` and `unwrap_err`.
@bors
Copy link
Contributor

bors commented Jul 17, 2019

☀️ Test successful - checks-azure
Approved by: rkruppe
Pushing d56128d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 17, 2019
@bors bors merged commit 74c8d98 into rust-lang:master Jul 17, 2019
@bryanburgers-bot
Copy link

☔ The latest upstream changes made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants