From ae7e55c1dd801c60092205ec8890179e10a47814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sun, 21 Mar 2021 13:13:34 +0100 Subject: clippy::complexity simplifications related to Iterators --- crates/hir_ty/src/infer/pat.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/hir_ty') diff --git a/crates/hir_ty/src/infer/pat.rs b/crates/hir_ty/src/infer/pat.rs index befa0d69b..ec491648f 100644 --- a/crates/hir_ty/src/infer/pat.rs +++ b/crates/hir_ty/src/infer/pat.rs @@ -38,7 +38,7 @@ impl<'a> InferenceContext<'a> { let field_tys = def.map(|it| self.db.field_types(it)).unwrap_or_default(); let (pre, post) = match ellipsis { Some(idx) => subpats.split_at(idx), - None => (&subpats[..], &[][..]), + None => (subpats, &[][..]), }; let post_idx_offset = field_tys.iter().count() - post.len(); -- cgit v1.2.3