From de1d5d0ad2b6b9cf410cb6a45f6bb7bc3d33f9fd Mon Sep 17 00:00:00 2001 From: Jakub Nabaglo Date: Mon, 13 Sep 2021 15:42:59 -0700 Subject: [PATCH] Minor: fix a few warnings (#239) * Minor: fix a few warnings * Lints --- src/field/packed_crandall_avx2.rs | 3 +-- src/hash/hashing.rs | 3 +-- src/hash/poseidon_avx2.rs | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/field/packed_crandall_avx2.rs b/src/field/packed_crandall_avx2.rs index 4eb900e7..a5336126 100644 --- a/src/field/packed_crandall_avx2.rs +++ b/src/field/packed_crandall_avx2.rs @@ -5,7 +5,6 @@ use std::iter::{Product, Sum}; use std::ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign}; use crate::field::crandall_field::CrandallField; -use crate::field::field_types::Field; use crate::field::packed_field::PackedField; // PackedCrandallAVX2 wraps an array of four u64s, with the new and get methods to convert that @@ -470,7 +469,7 @@ unsafe fn interleave1(x: __m256i, y: __m256i) -> (__m256i, __m256i) { #[cfg(test)] mod tests { - use crate::field::crandall_field::CrandallField; + use crate::field::field_types::Field; use crate::field::packed_crandall_avx2::*; const TEST_VALS_A: [CrandallField; 4] = [ diff --git a/src/hash/hashing.rs b/src/hash/hashing.rs index 6e243773..9b4791d3 100644 --- a/src/hash/hashing.rs +++ b/src/hash/hashing.rs @@ -1,8 +1,7 @@ //! Concrete instantiation of a hash function. use crate::field::extension_field::Extendable; -use crate::field::field_types::{Field, RichField}; -use crate::hash::gmimc::GMiMC; +use crate::field::field_types::RichField; use crate::hash::hash_types::{HashOut, HashOutTarget}; use crate::iop::target::Target; use crate::plonk::circuit_builder::CircuitBuilder; diff --git a/src/hash/poseidon_avx2.rs b/src/hash/poseidon_avx2.rs index c2a617b5..c5e197b6 100644 --- a/src/hash/poseidon_avx2.rs +++ b/src/hash/poseidon_avx2.rs @@ -56,7 +56,7 @@ unsafe fn iteration8( ) -> [Vecs128; 2] // 2 vectors of 4 needed to represent entire state. where - [(); { INDEX + 4 }]: , + [(); INDEX + 4]: , [(); (64 - SHIFT) as usize]: , { // Entire state, rotated by INDEX. @@ -130,8 +130,8 @@ unsafe fn iteration12( ) -> [Vecs128; 3] // 3 vectors of 4 needed to represent entire state. where - [(); { INDEX + 4 }]: , - [(); { INDEX + 8 }]: , + [(); INDEX + 4]: , + [(); INDEX + 8]: , [(); (64 - SHIFT) as usize]: , { // Entire state, rotated by INDEX.