Skip to content

Commit 3c3dc6d

Browse files
committed
misc: don't bother checking the other branch
1 parent f042011 commit 3c3dc6d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

clippy_lints/src/useless_conversion.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,7 @@ impl<'tcx> LateLintPass<'tcx> for UselessConversion {
407407
None,
408408
hint,
409409
);
410-
}
411-
412-
if name == sym::from_fn && same_type_and_consts(a, b) {
410+
} else if name == sym::from_fn && same_type_and_consts(a, b) {
413411
let mut app = Applicability::MachineApplicable;
414412
let sugg = Sugg::hir_with_context(cx, arg, e.span.ctxt(), "<expr>", &mut app).maybe_paren();
415413
let sugg_msg = format!("consider removing `{}()`", snippet(cx, path.span, "From::from"));

0 commit comments

Comments
 (0)