From 4763377a96691997e03e27f7b292e7dcd5e7a53d Mon Sep 17 00:00:00 2001 From: Taylor Yu Date: Thu, 10 Jun 2021 22:27:27 -0500 Subject: [PATCH] fix typo in option doc Fix a typo/missed replacement in the documentation for `impl From<&Option> for Option<&T>` in `core::option`. --- library/core/src/option.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/option.rs b/library/core/src/option.rs index 0dd182203df..aedfe88f688 100644 --- a/library/core/src/option.rs +++ b/library/core/src/option.rs @@ -1350,7 +1350,7 @@ impl<'a, T> From<&'a Option> 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