Skip to content

Commit

Permalink
Rollup merge of rust-lang#23862 - jviereck:fix_23713_v2, r=steveklabnik
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Manishearth committed Mar 31, 2015
2 parents b4457fb + 085bcfa commit 8225a1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ impl<T> Option<T> {
}
}

/// Moves the value `v` out of the `Option<T>` if the content of the `Option<T>` is a `Some(v)`.
/// Moves the value `v` out of the `Option<T>` if it is `Some(v)`.
///
/// # Panics
///
Expand Down

0 comments on commit 8225a1c

Please sign in to comment.