File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments