Skip to content

Commit

Permalink
fix typo in option doc
Browse files Browse the repository at this point in the history
Fix a typo/missed replacement in the documentation for
`impl From<&Option<T>> for Option<&T>` in `core::option`.
  • Loading branch information
tlyu committed Jun 11, 2021
1 parent cb65b48 commit 4763377
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/option.rs
Original file line number Diff line number Diff line change
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 4763377

Please sign in to comment.