Skip to content

Commit

Permalink
Rollup merge of rust-lang#88772 - orlp:result-map-or-else-docfix, r=y…
Browse files Browse the repository at this point in the history
…aahc

Fixed confusing wording on Result::map_or_else.

Fixes rust-lang#88195.
  • Loading branch information
Manishearth committed Oct 7, 2021
2 parents deb20a3 + c3dfda0 commit 899250e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions library/core/src/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 899250e

Please sign in to comment.