Rebase Result::map_or_else doc wording on top of #89400.

This commit is contained in:
Orson Peters 2021-09-09 11:46:22 +02:00
parent 98a5a98f44
commit c3dfda0e3d

View file

@ -795,9 +795,8 @@ impl<T, E> Result<T, E> {
} }
} }
/// Maps a `Result<T, E>` to `U` by applying a provided default fallback /// Maps a `Result<T, E>` to `U` by applying fallback function `default` to
/// function to a contained [`Err`] value, or a provided function to a /// a contained [`Err`] value, or function `f` to a contained [`Ok`] value.
/// contained [`Ok`] value.
/// ///
/// This function can be used to unpack a successful result /// This function can be used to unpack a successful result
/// while handling an error. /// while handling an error.