Skip to content

Commit a3ec772

Browse files
committed
Remove explicit return of bool
- detected by dogfood
1 parent 679f755 commit a3ec772

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clippy_lints/src/field_reassign_with_default.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,9 @@ fn is_expr_default<'tcx>(expr: &'tcx Expr<'tcx>, cx: &LateContext<'tcx>) -> bool
157157
if let ExprKind::Call(ref fn_expr, _) = &expr.kind;
158158
if let ExprKind::Path(qpath) = &fn_expr.kind;
159159
if let Res::Def(_, def_id) = qpath_res(cx, qpath, fn_expr.hir_id);
160-
// right hand side of assignment is `Default::default`
161-
if match_def_path(cx, def_id, &paths::DEFAULT_TRAIT_METHOD);
162160
then {
163-
true
161+
// right hand side of assignment is `Default::default`
162+
match_def_path(cx, def_id, &paths::DEFAULT_TRAIT_METHOD)
164163
} else {
165164
false
166165
}

0 commit comments

Comments
 (0)