about summary refs log tree commit diff
path: root/clippy_lints/src/format.rs
diff options
context:
space:
mode:
Diffstat (limited to 'clippy_lints/src/format.rs')
-rw-r--r--clippy_lints/src/format.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/format.rs b/clippy_lints/src/format.rs
index 0c5851cdbed..f10d8256953 100644
--- a/clippy_lints/src/format.rs
+++ b/clippy_lints/src/format.rs
@@ -71,12 +71,12 @@ impl<'tcx> LateLintPass<'tcx> for UselessFormat {
             let value = arg.param.value;
             if_chain! {
                 if format_args.format_string.parts == [kw::Empty];
+                if arg.format.is_default();
                 if match cx.typeck_results().expr_ty(value).peel_refs().kind() {
                     ty::Adt(adt, _) => cx.tcx.is_diagnostic_item(sym::String, adt.did()),
                     ty::Str => true,
                     _ => false,
                 };
-                if !arg.format.has_string_formatting();
                 then {
                     let is_new_string = match value.kind {
                         ExprKind::Binary(..) => true,