Skip to content

Commit

Permalink
Rollup merge of #86209 - tlyu:option-doc-typos, r=JohnTitor
Browse files Browse the repository at this point in the history
fix minor wording/typo issues in core::option docs

These are just minor wording or typo things I came across while making other edits.
  • Loading branch information
JohnTitor authored Jun 16, 2021
2 parents 7ceb706 + 4763377 commit d476707
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/core/src/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
//! the optional owned box, [`Option`]`<`[`Box<T>`]`>`.
//!
//! The following example uses [`Option`] to create an optional box of
//! [`i32`]. Notice that in order to use the inner [`i32`] value first, the
//! `check_optional` function needs to use pattern matching to
//! [`i32`]. Notice that in order to use the inner [`i32`] value, the
//! `check_optional` function first needs to use pattern matching to
//! determine whether the box has a value (i.e., it is [`Some(...)`][`Some`]) or
//! not ([`None`]).
//!
Expand Down Expand Up @@ -1350,7 +1350,7 @@ impl<'a, T> From<&'a Option<T>> for Option<&'a T> {
///
/// 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
/// so this technique uses `from` to first take an `Option` to a reference
/// to the value inside the original.
///
/// [`map`]: Option::map
Expand Down

0 comments on commit d476707

Please sign in to comment.