unwrap method
T
unwrap(
- Result<
T, E> result
Returns the ok variant or throws the inner error
Implementation
T unwrap(Result<T, E> result) {
if (result.isOk()) {
return result.unwrap();
}
throw result.unwrapErr();
}