Skip to content

Commit

Permalink
Update src/libcore/option.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
  • Loading branch information
Dolpheyn and steveklabnik authored May 13, 2020
1 parent f445a82 commit ef1688d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libcore/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit ef1688d

Please sign in to comment.