Update src/libcore/option.rs

Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
This commit is contained in:
Faris Sufyan 2020-05-13 21:12:50 +08:00 committed by GitHub
parent a9e7d57238
commit 644bb24e33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 => (),