diff --git a/src/libcore/option.rs b/src/libcore/option.rs index b8fe28d0f0d7..96b551d8704a 100644 --- a/src/libcore/option.rs +++ b/src/libcore/option.rs @@ -233,10 +233,10 @@ impl Option { /// [`usize`]: ../../std/primitive.usize.html /// /// ``` - /// let num_as_str: Option = Some("10".to_string()); + /// let num_as_str: Option = Some("12".to_string()); /// // First, cast `Option` to `Option<&String>` with `as_ref`, /// // then consume *that* with `map`, leaving `num_as_str` on the stack. - /// let num_as_int: Option = num_as_str.as_ref().map(|n| n.len()); + /// let num_length: Option = num_as_str.as_ref().map(|n| n.len()); /// println!("still can print num_as_str: {:?}", num_as_str); /// ``` #[inline]