Function mz_sql::query_model::validator::merge
source · fn merge(lhs: ValidationResult, rhs: ValidationResult) -> ValidationResult
Expand description
Consumes and merges two ValidationResult
instances, reusing memory
if possible.
- If both results are
Ok(())
variants, the left one is returned. - If one result is
Err(errors)
and the other isOk(())
, theErr
is returned. - If both results are
Err(errors)
variants, a newErr
with the concatenatederrors
is returned.