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

commented Jul 11, 2019

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

Add Option::expect_none(msg) and unwrap_none()
These are `Option` analogues to `Result::expect_err` and `unwrap_err`.
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jul 11, 2019

r? @rkruppe

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

@cuviper

This comment has been minimized.

Copy link
Member Author

commented Jul 11, 2019

Show resolved Hide resolved src/libcore/option.rs Outdated
Show resolved Hide resolved src/libcore/option.rs Outdated
@rkruppe

This comment has been minimized.

Copy link
Member

commented Jul 13, 2019

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

@cuviper

This comment has been minimized.

Copy link
Member Author

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

This comment has been minimized.

Copy link
Member

commented Jul 16, 2019

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.

@rkruppe

This comment has been minimized.

Copy link
Member

commented Jul 16, 2019

Cool, thanks for clarifying!

@bors r+

@bors

This comment has been minimized.

Copy link
Contributor

commented Jul 16, 2019

📌 Commit 74c8d98 has been approved by rkruppe

@bors

This comment has been minimized.

Copy link
Contributor

commented Jul 17, 2019

⌛️ Testing commit 74c8d98 with merge d56128d...

bors added a commit that referenced this pull request Jul 17, 2019

Auto merge of #62596 - cuviper:expect_none, r=rkruppe
Add Option::expect_none(msg) and unwrap_none()

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

This comment has been minimized.

Copy link
Contributor

commented Jul 17, 2019

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

@bors bors added the merged-by-bors label Jul 17, 2019

@bors bors merged commit 74c8d98 into rust-lang:master Jul 17, 2019

4 checks passed

homu Test successful
Details
pr Build #20190712.55 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
@bryanburgers-bot

This comment has been minimized.

Copy link

commented Jul 17, 2019

☔️ 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
Projects
None yet
9 participants
You can’t perform that action at this time.