Skip to content

Commit d430b4e

Browse files
committed
Format
1 parent 2022ed2 commit d430b4e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clippy_lints/src/methods/option_map_unwrap_or.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ pub(super) fn check<'tcx>(
5959
};
6060

6161
let map = cx.tcx.hir();
62-
let body = map.body_owned_by(map.enclosing_body_owner(expr.hir_id));
63-
reference_visitor.visit_body(body);
62+
let body = map.body(map.body_owned_by(map.enclosing_body_owner(expr.hir_id)));
6463

65-
if reference_visitor.visit_body(body);.is_break() {
64+
// Visit the body, and return if we've found a reference
65+
if reference_visitor.visit_body(body).is_break() {
6666
return;
6767
};
6868
}

clippy_lints/src/unconditional_recursion.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ where
293293
}
294294

295295
fn visit_expr(&mut self, expr: &'tcx Expr<'tcx>) -> ControlFlow<()> {
296-
walk_expr(self, expr);
296+
walk_expr(self, expr)?;
297297

298298
if let ExprKind::Call(f, _) = expr.kind
299299
&& let ExprKind::Path(qpath) = f.kind

0 commit comments

Comments
 (0)