Skip to content

Commit

Permalink
Corrected feature name for map_or_else
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanbakel committed Aug 29, 2018
1 parent b8c6030 commit 5eb6791
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libcore/result.rs
Expand Up @@ -494,7 +494,7 @@ impl<T, E> Result<T, E> {
/// assert_eq!(x.map_or_else(|e| k * 2, |v| v.len()), 42);
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.30.0")]
#[stable(feature = "result_map_or_else", since = "1.30.0")]
pub fn map_or_else<U, M: FnOnce(T) -> U, F: FnOnce(E) -> U>(self, fallback: F, map: M) -> U {
self.map(map).unwrap_or_else(fallback)
}
Expand Down

0 comments on commit 5eb6791

Please sign in to comment.