We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Result::map_or
PR #66292 added Result::map_or with implementation:
impl<T, E> Result<T, E> { pub fn map_or<U, F: FnOnce(T) -> U>(self, default: U, f: F) -> U { match self { Ok(t) => f(t), Err(_) => default, } } }