Skip to content

Commit 8ce9257

Browse files
committed
Remove redundant to_strings in if_then_panic.rs
1 parent b95a59d commit 8ce9257

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/if_then_panic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ impl LateLintPass<'_> for IfThenPanic {
7878
if let Expr{kind: ExprKind::Unary(UnOp::Not, not_expr), ..} = e {
7979
sugg::Sugg::hir_with_applicability(cx, not_expr, "..", &mut applicability).maybe_par().to_string()
8080
} else {
81-
format!("!{}", sugg::Sugg::hir_with_applicability(cx, e, "..", &mut applicability).maybe_par().to_string())
81+
format!("!{}", sugg::Sugg::hir_with_applicability(cx, e, "..", &mut applicability).maybe_par())
8282
}
8383
} else {
84-
format!("!{}", sugg::Sugg::hir_with_applicability(cx, cond, "..", &mut applicability).maybe_par().to_string())
84+
format!("!{}", sugg::Sugg::hir_with_applicability(cx, cond, "..", &mut applicability).maybe_par())
8585
};
8686

8787
span_lint_and_sugg(

0 commit comments

Comments
 (0)