From 35b0015b09ad3c2b69b7f00f0f4685e6eafa5628 Mon Sep 17 00:00:00 2001 From: Tyler Hart Date: Thu, 30 Sep 2021 11:12:09 -0400 Subject: [PATCH] Improve wording of `map_or_else` docs Changes doc text to refer to the "default" parameter as the "default" function. --- library/core/src/result.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/core/src/result.rs b/library/core/src/result.rs index bd4e623732e2a..a829c10b840f8 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -329,8 +329,8 @@ //! [`Ok`], or returns the provided default value if the [`Result`] is //! [`Err`] //! * [`map_or_else`] applies the provided function to the contained value -//! of [`Ok`], or applies the provided fallback function to the contained -//! value of [`Err`] +//! of [`Ok`], or applies the provided default fallback function to the +//! contained value of [`Err`] //! //! [`map_or`]: Result::map_or //! [`map_or_else`]: Result::map_or_else @@ -795,8 +795,8 @@ impl Result { } } - /// Maps a `Result` to `U` by applying a fallback function to a - /// contained [`Err`] value, or a default function to a + /// Maps a `Result` to `U` by applying a provided default fallback + /// function to a contained [`Err`] value, or a provided function to a /// contained [`Ok`] value. /// /// This function can be used to unpack a successful result