From 35a0060aba4bc9ff4e2b8faa20b91762c3109b18 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Fri, 3 Sep 2021 12:36:33 +0200 Subject: [PATCH] Use IntoIterator for array impl everywhere. --- clippy_lints/src/matches.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/clippy_lints/src/matches.rs b/clippy_lints/src/matches.rs index 7142df98c3f1..48e459e01659 100644 --- a/clippy_lints/src/matches.rs +++ b/clippy_lints/src/matches.rs @@ -13,7 +13,6 @@ remove_blocks, strip_pat_refs, }; use clippy_utils::{paths, search_same, SpanlessEq, SpanlessHash}; -use core::array; use core::iter::{once, ExactSizeIterator}; use if_chain::if_chain; use rustc_ast::ast::{Attribute, LitKind}; @@ -1306,7 +1305,7 @@ fn check_match_like_matches<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) return find_matches_sugg( cx, let_expr, - array::IntoIter::new([(&[][..], Some(let_pat), if_then, None), (&[][..], None, if_else, None)]), + IntoIterator::into_iter([(&[][..], Some(let_pat), if_then, None), (&[][..], None, if_else, None)]), expr, true, );