flatten method

Result<S, F> flatten()

Converts a Result of a Result into a single Result

Implementation

Result<S, F> flatten() {
  if (isOk()) {
    return unwrap();
  }
  return Err(unwrapErr());
}