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