Corrected feature name for map_or_else
This commit is contained in:
parent
b8c60302e7
commit
5eb679105f
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue