Propagate errors rather than using return_if_err
This commit is contained in:
parent
db193c1c9d
commit
e65cefcf6f
11 changed files with 17 additions and 13 deletions
|
|
@ -119,7 +119,7 @@ fn imm_borrows_in_expr(cx: &LateContext<'_>, e: &hir::Expr<'_>) -> HirIdSet {
|
|||
|
||||
let mut s = S(HirIdSet::default());
|
||||
let v = ExprUseVisitor::for_clippy(cx, e.hir_id.owner.def_id, &mut s);
|
||||
v.consume_expr(e);
|
||||
v.consume_expr(e).into_ok();
|
||||
s.0
|
||||
}
|
||||
|
||||
|
|
@ -144,6 +144,6 @@ fn mut_borrows_in_expr(cx: &LateContext<'_>, e: &hir::Expr<'_>) -> HirIdSet {
|
|||
|
||||
let mut s = S(HirIdSet::default());
|
||||
let v = ExprUseVisitor::for_clippy(cx, e.hir_id.owner.def_id, &mut s);
|
||||
v.consume_expr(e);
|
||||
v.consume_expr(e).into_ok();
|
||||
s.0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue