about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2021-09-03 12:36:33 +0200
committerMara Bos <m-ou.se@m-ou.se>2021-12-04 19:40:33 +0100
commit35a0060aba4bc9ff4e2b8faa20b91762c3109b18 (patch)
treebe02d12d09be91e1a0e01b3c7bfcb3cbc0f01771
parentc813bfa424b62086a095a5010c4065a043703a4e (diff)
downloadrust-35a0060aba4bc9ff4e2b8faa20b91762c3109b18.tar.gz
rust-35a0060aba4bc9ff4e2b8faa20b91762c3109b18.zip
Use IntoIterator for array impl everywhere.
-rw-r--r--clippy_lints/src/matches.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/clippy_lints/src/matches.rs b/clippy_lints/src/matches.rs
index 7142df98c3f..48e459e0165 100644
--- a/clippy_lints/src/matches.rs
+++ b/clippy_lints/src/matches.rs
@@ -13,7 +13,6 @@ use clippy_utils::{
     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,
         );