From c7ad71ccf2a805529d18cf45a09bd3196994a488 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Thu, 12 Apr 2018 08:50:42 +0200 Subject: [PATCH] Fix clippy warnings --- clippy_lints/src/format.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/format.rs b/clippy_lints/src/format.rs index bce0eff2fc5..25cff794fd8 100644 --- a/clippy_lints/src/format.rs +++ b/clippy_lints/src/format.rs @@ -147,9 +147,9 @@ fn check_unformatted(expr: &Expr) -> bool { if let ExprArray(ref exprs) = expr.node; if exprs.len() == 1; if let ExprStruct(_, ref fields, _) = exprs[0].node; - if let Some(format_field) = fields.iter().filter(|f| f.name.node == "format").next(); + if let Some(format_field) = fields.iter().find(|f| f.name.node == "format"); if let ExprStruct(_, ref fields, _) = format_field.expr.node; - if let Some(align_field) = fields.iter().filter(|f| f.name.node == "width").next(); + if let Some(align_field) = fields.iter().find(|f| f.name.node == "width"); if let ExprPath(ref qpath) = align_field.expr.node; if last_path_segment(qpath).name == "Implied"; then {