Skip to content

Commit d476707

Browse files
authored
Rollup merge of #86209 - tlyu:option-doc-typos, r=JohnTitor
fix minor wording/typo issues in core::option docs These are just minor wording or typo things I came across while making other edits.
2 parents 7ceb706 + 4763377 commit d476707

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/core/src/option.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
//! the optional owned box, [`Option`]`<`[`Box<T>`]`>`.
5151
//!
5252
//! The following example uses [`Option`] to create an optional box of
53-
//! [`i32`]. Notice that in order to use the inner [`i32`] value first, the
54-
//! `check_optional` function needs to use pattern matching to
53+
//! [`i32`]. Notice that in order to use the inner [`i32`] value, the
54+
//! `check_optional` function first needs to use pattern matching to
5555
//! determine whether the box has a value (i.e., it is [`Some(...)`][`Some`]) or
5656
//! not ([`None`]).
5757
//!
@@ -1350,7 +1350,7 @@ impl<'a, T> From<&'a Option<T>> for Option<&'a T> {
13501350
///
13511351
/// Converts an `Option<`[`String`]`>` into an `Option<`[`usize`]`>`, preserving the original.
13521352
/// The [`map`] method takes the `self` argument by value, consuming the original,
1353-
/// so this technique uses `as_ref` to first take an `Option` to a reference
1353+
/// so this technique uses `from` to first take an `Option` to a reference
13541354
/// to the value inside the original.
13551355
///
13561356
/// [`map`]: Option::map

0 commit comments

Comments
 (0)