Update src/libcore/option.rs
Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
This commit is contained in:
parent
f445a8286e
commit
ef1688db8e
1 changed files with 1 additions and 0 deletions
|
|
@ -1411,6 +1411,7 @@ impl<'a, T> From<&'a mut Option<T>> for Option<&'a mut T> {
|
|||
/// Some(t) => *t = String::from("Hello, Rustaceans!"),
|
||||
/// None => (),
|
||||
/// }
|
||||
///
|
||||
/// assert_eq!(s, Some(String::from("Hello, Rustaceans!")));
|
||||
/// ```
|
||||
fn from(o: &'a mut Option<T>) -> Option<&'a mut T> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue