Skip to content

Commit 0a538af

Browse files
committed
fix typo in option doc
Fix a typo/missed replacement in the documentation for `impl From<&Option<T>> for Option<&T>` in `core::option`.
1 parent b35e0b5 commit 0a538af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/option.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -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)