diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 39462dca4ff3e..7cc00e3f8d1b7 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -652,13 +652,14 @@ impl Option { /// /// # Examples /// - /// Converts an Option<[String]> into an Option<[usize]>, preserving - /// the original. The [`map`] method takes the `self` argument by value, consuming the original, - /// so this technique uses `as_ref` to first take an `Option` to a reference - /// to the value inside the original. + /// Calculates the length of an Option<[String]> as an Option<[usize]> + /// without moving the [`String`]. The [`map`] method takes the `self` argument by value, + /// consuming the original, so this technique uses `as_ref` to first take an `Option` to a + /// reference to the value inside the original. /// /// [`map`]: Option::map /// [String]: ../../std/string/struct.String.html "String" + /// [`String`]: ../../std/string/struct.String.html "String" /// /// ``` /// let text: Option = Some("Hello, world!".to_string()); @@ -946,8 +947,8 @@ impl Option { /// /// # Examples /// - /// Converts an Option<[String]> into an Option<[usize]>, consuming - /// the original: + /// Calculates the length of an Option<[String]> as an + /// Option<[usize]>, consuming the original: /// /// [String]: ../../std/string/struct.String.html "String" /// ```