mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-29 16:13:40 +00:00
Rollup merge of #88772 - orlp:result-map-or-else-docfix, r=yaahc
Fixed confusing wording on Result::map_or_else. Fixes https://github.com/rust-lang/rust/issues/88195.
This commit is contained in:
commit
2b6d7f75f7
@ -795,9 +795,8 @@ impl<T, E> Result<T, E> {
|
||||
}
|
||||
}
|
||||
|
||||
/// Maps a `Result<T, E>` to `U` by applying a provided default fallback
|
||||
/// function to a contained [`Err`] value, or a provided function to a
|
||||
/// contained [`Ok`] value.
|
||||
/// Maps a `Result<T, E>` to `U` by applying fallback function `default` to
|
||||
/// a contained [`Err`] value, or function `f` to a contained [`Ok`] value.
|
||||
///
|
||||
/// This function can be used to unpack a successful result
|
||||
/// while handling an error.
|
||||
|
Loading…
Reference in New Issue
Block a user