Skip to content

Commit 4048d26

Browse files
smoeliuscamsteffen
andcommitted
Update clippy_lints/src/format.rs
Co-authored-by: Cameron Steffen <cam.steffen94@gmail.com>
1 parent 0636a66 commit 4048d26

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clippy_lints/src/format.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ impl<'tcx> LateLintPass<'tcx> for UselessFormat {
6969
_ => false,
7070
};
7171
if let Some(args) = format_args.args();
72-
if args.iter().all(FormatArgsArg::is_display);
73-
if !args.iter().any(FormatArgsArg::has_string_formatting);
72+
if args.iter().all(|arg| arg.is_display() && !arg.has_string_formatting());
7473
then {
7574
let is_new_string = match value.kind {
7675
ExprKind::Binary(..) => true,

0 commit comments

Comments
 (0)