Don't mix combinators and let else
Co-authored-by: Michael Goulet <michael@errs.io>
This commit is contained in:
parent
4b2e8bc841
commit
f0511851bc
1 changed files with 6 additions and 3 deletions
|
@ -430,9 +430,12 @@ impl<'p, 'tcx> MatchVisitor<'p, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
let scrut_ty = scrut.ty;
|
let scrut_ty = scrut.ty;
|
||||||
let Ok(report) = analyze_match(&cx, &tarms, scrut_ty).map_err(|err| self.error = Err(err))
|
let report = match analyze_match(&cx, &tarms, scrut_ty) {
|
||||||
else {
|
Ok(report) => report,
|
||||||
return;
|
Err(err) => {
|
||||||
|
self.error = Err(err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
match source {
|
match source {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue