diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-16 05:23:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-16 05:23:30 +0100 |
| commit | 84ef88975bff75fc82e6950c688b8d57a6c02bdb (patch) | |
| tree | 47f976a1788ab4482ec256e19a3f3dc84e2cd346 /src/libcore | |
| parent | c34ea91a9dbea9b23653dc39cb09e5d412353359 (diff) | |
| parent | 93438fd839fd48c3714afd9ff5056720bc40ba62 (diff) | |
Rollup merge of #66570 - lzutao:stabilize-result-map_or, r=Dylan-DPC
stabilize Result::map_or r? @SimonSapin Closes #66293
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/result.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libcore/result.rs b/src/libcore/result.rs index 1a0845f3a6d..fb4dc62d8c1 100644 --- a/src/libcore/result.rs +++ b/src/libcore/result.rs @@ -520,7 +520,6 @@ impl<T, E> Result<T, E> { /// # Examples /// /// ``` - /// #![feature(result_map_or)] /// let x: Result<_, &str> = Ok("foo"); /// assert_eq!(x.map_or(42, |v| v.len()), 3); /// @@ -528,7 +527,7 @@ impl<T, E> Result<T, E> { /// assert_eq!(x.map_or(42, |v| v.len()), 42); /// ``` #[inline] - #[unstable(feature = "result_map_or", issue = "66293")] + #[stable(feature = "result_map_or", since = "1.41.0")] pub fn map_or<U, F: FnOnce(T) -> U>(self, default: U, f: F) -> U { match self { Ok(t) => f(t), |
