Skip to content

Commit 6c3856f

Browse files
Update src/libcore/option.rs
Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
1 parent ef1688d commit 6c3856f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/libcore/option.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,9 @@ impl<'a, T> From<&'a Option<T>> for Option<&'a T> {
13891389
/// ```
13901390
/// let s: Option<String> = Some(String::from("Hello, Rustaceans!"));
13911391
/// let o: Option<usize> = Option::from(&s).map(|ss: &String| ss.len());
1392+
///
13921393
/// println!("Can still print s: {:?}", s);
1394+
///
13931395
/// assert_eq!(o, Some(18));
13941396
/// ```
13951397
fn from(o: &'a Option<T>) -> Option<&'a T> {

0 commit comments

Comments
 (0)