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

Second attempt to fix #23713 based on follow-up comments in #23791. #23862

Merged
merged 1 commit into from
Mar 31, 2015

Conversation

jviereck
Copy link
Contributor

Based on the comment from @apasel422 in #23791 (comment).
Where @apasel422 proposed

Moves the value out of the option if it is `Some`, or panics if it is `None`.

I include in this PR the version

Moves the value `v` out of the `Option` if it is `Some(v)`, or panics if it is `None`.

which

  • is a little bit more precise about what value is actually returned
  • uses Option over just "option" in the part `out of the [Option]

r? @steveklabnik, @apasel422

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @steveklabnik (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see CONTRIBUTING.md for more information.

@steveklabnik
Copy link
Member

I still think repeating this panic behavior ends up being more confusing than it's worth.

@steveklabnik
Copy link
Member

and it should be Option<T>.

@jviereck
Copy link
Contributor Author

I still think repeating this panic behavior ends up being more confusing than it's worth.

I disagree but I will change it according to your request.
(As from my point of view the description should give a full overview of what the function is doing and that requires including the handling for the case of Option<T> = None - even if that goes at the cost of mentioning the panic behavior of the method twice. )

and it should be Option.

Alright, that was before I saw your reply at #23795 (comment), fix is on the way :)

@jviereck
Copy link
Contributor Author

r? @steveklabnik - pushed the changeset with the requested changes. Thanks!

@steveklabnik
Copy link
Member

This is such a small change, it should be one commit. Mind squashing real quick? r=me after

@jviereck
Copy link
Contributor Author

Mind squashing real quick? r=me after

Done :) - Thanks @steveklabnik for the fast reply!

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Mar 30, 2015

📌 Commit 085bcfa has been approved by steveklabnik

Manishearth added a commit to Manishearth/rust that referenced this pull request Mar 31, 2015
Based on the comment from @apasel422  in rust-lang#23791 (comment).
Where @apasel422 proposed
```
Moves the value out of the option if it is `Some`, or panics if it is `None`.
```
I include in this PR the version
```
Moves the value `v` out of the `Option` if it is `Some(v)`, or panics if it is `None`.
```
which 
- is a little bit more precise about what value is actually returned
- uses `Option` over just "option" in the part `out of the [Option]

r? @steveklabnik, @apasel422
bors added a commit that referenced this pull request Mar 31, 2015
@bors bors merged commit 085bcfa into rust-lang:master Mar 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants