Update src/libcore/option.rs
Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
This commit is contained in:
parent
a9e7d57238
commit
644bb24e33
@ -1405,6 +1405,7 @@ impl<'a, T> From<&'a mut Option<T>> for Option<&'a mut T> {
|
||||
/// ```
|
||||
/// let mut s = Some(String::from("Hello"));
|
||||
/// let o: Option<&mut String> = Option::from(&mut s);
|
||||
///
|
||||
/// match o {
|
||||
/// Some(t) => *t = String::from("Hello, Rustaceans!"),
|
||||
/// None => (),
|
||||
|
Loading…
Reference in New Issue
Block a user