Skip to content

Commit 35a0060

Browse files
committed
Use IntoIterator for array impl everywhere.
1 parent c813bfa commit 35a0060

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clippy_lints/src/matches.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use clippy_utils::{
1313
remove_blocks, strip_pat_refs,
1414
};
1515
use clippy_utils::{paths, search_same, SpanlessEq, SpanlessHash};
16-
use core::array;
1716
use core::iter::{once, ExactSizeIterator};
1817
use if_chain::if_chain;
1918
use rustc_ast::ast::{Attribute, LitKind};
@@ -1306,7 +1305,7 @@ fn check_match_like_matches<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>)
13061305
return find_matches_sugg(
13071306
cx,
13081307
let_expr,
1309-
array::IntoIter::new([(&[][..], Some(let_pat), if_then, None), (&[][..], None, if_else, None)]),
1308+
IntoIterator::into_iter([(&[][..], Some(let_pat), if_then, None), (&[][..], None, if_else, None)]),
13101309
expr,
13111310
true,
13121311
);

0 commit comments

Comments
 (0)