Skip to content

Commit c06a8ea

Browse files
committedNov 12, 2019
stabilize Result::map_or_else
1 parent 2de6c35 commit c06a8ea

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎src/libcore/result.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,6 @@ impl<T, E> Result<T, E> {
529529
/// Basic usage:
530530
///
531531
/// ```
532-
/// #![feature(result_map_or_else)]
533532
/// let k = 21;
534533
///
535534
/// let x : Result<_, &str> = Ok("foo");
@@ -539,7 +538,7 @@ impl<T, E> Result<T, E> {
539538
/// assert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
540539
/// ```
541540
#[inline]
542-
#[unstable(feature = "result_map_or_else", issue = "53268")]
541+
#[stable(feature = "result_map_or_else", since = "1.41.0")]
543542
pub fn map_or_else<U, D: FnOnce(E) -> U, F: FnOnce(T) -> U>(self, default: D, f: F) -> U {
544543
match self {
545544
Ok(t) => f(t),

0 commit comments

Comments
 (0)
Please sign in to comment.