diff options
| author | Jubilee <46493976+workingjubilee@users.noreply.github.com> | 2021-10-07 20:26:11 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-07 20:26:11 -0700 |
| commit | 2b6d7f75f7f5ac0bce2265b0e33256356441ccba (patch) | |
| tree | 91e0620974811d0c80e32ad33f14f0a6c12013a4 | |
| parent | cbb561fdab663993e483479db3be612771746b26 (diff) | |
| parent | c3dfda0e3d9f006b9f279d263b88db9a13861037 (diff) | |
| download | rust-2b6d7f75f7f5ac0bce2265b0e33256356441ccba.tar.gz rust-2b6d7f75f7f5ac0bce2265b0e33256356441ccba.zip | |
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.
| -rw-r--r-- | library/core/src/result.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/library/core/src/result.rs b/library/core/src/result.rs index c9c2d2e645a..dda827900d9 100644 --- a/library/core/src/result.rs +++ b/library/core/src/result.rs @@ -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. |
