From 9cb2c0916117e9f82910100b9c50d941f4a33657 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Wed, 11 Dec 2024 19:29:54 +0100 Subject: [PATCH] Remove unnecessary call to take --- src/fields/large_fields.rs | 1 - src/fields/x86_simd_large_fields.rs | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/fields/large_fields.rs b/src/fields/large_fields.rs index d1a662b..f940221 100644 --- a/src/fields/large_fields.rs +++ b/src/fields/large_fields.rs @@ -128,7 +128,6 @@ where debug_assert_eq!(x.len(), 8); let (x0, x) = x.split_at(1); x.iter() - .take(7) .zip(Self::ALPHA) .fold(x0[0], |sum, (xi, alphai)| sum + (alphai * xi)) } diff --git a/src/fields/x86_simd_large_fields.rs b/src/fields/x86_simd_large_fields.rs index 6dda2b5..a6d8869 100644 --- a/src/fields/x86_simd_large_fields.rs +++ b/src/fields/x86_simd_large_fields.rs @@ -497,7 +497,6 @@ impl ByteCombine for GF128 { debug_assert_eq!(x.len(), 8); let (x0, x) = x.split_at(1); x.iter() - .take(7) .zip(Self::ALPHA) .fold(x0[0], |sum, (xi, alphai)| sum + (alphai * xi)) } @@ -986,7 +985,6 @@ impl ByteCombine for GF256 { debug_assert_eq!(x.len(), 8); let (x0, x) = x.split_at(1); x.iter() - .take(7) .zip(Self::ALPHA) .fold(x0[0], |sum, (xi, alphai)| sum + (alphai * xi)) }