Don't mix combinators and let else

Co-authored-by: Michael Goulet <michael@errs.io>
This commit is contained in:
Nadrieril 2024-01-09 16:37:23 +01:00 committed by GitHub
parent 4b2e8bc841
commit f0511851bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -430,9 +430,12 @@ fn check_match(
}
let scrut_ty = scrut.ty;
let Ok(report) = analyze_match(&cx, &tarms, scrut_ty).map_err(|err| self.error = Err(err))
else {
return;
let report = match analyze_match(&cx, &tarms, scrut_ty) {
Ok(report) => report,
Err(err) => {
self.error = Err(err);
return;
}
};
match source {