diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-06-16 13:31:07 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-16 13:31:07 +0900 |
| commit | d476707a1f2f082b735e2e073153ba446c6a7ae8 (patch) | |
| tree | 2b768691ac063470d5c4b832a2fe3d038ad11810 | |
| parent | 7ceb706e9d9a6c3a19c3a340705fe4ac1c343d02 (diff) | |
| parent | 4763377a96691997e03e27f7b292e7dcd5e7a53d (diff) | |
| download | rust-d476707a1f2f082b735e2e073153ba446c6a7ae8.tar.gz rust-d476707a1f2f082b735e2e073153ba446c6a7ae8.zip | |
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.
| -rw-r--r-- | library/core/src/option.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 4e7afca6a49..aedfe88f688 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -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`]). //! @@ -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 |
