Update src/libcore/option.rs
Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
This commit is contained in:
parent
f445a8286e
commit
ef1688db8e
@ -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…
x
Reference in New Issue
Block a user