diff --git a/field/src/extension/mod.rs b/field/src/extension/mod.rs index 3586055e..bcf8537e 100644 --- a/field/src/extension/mod.rs +++ b/field/src/extension/mod.rs @@ -125,9 +125,9 @@ impl FieldExtension<1> for F { } /// Flatten the slice by sending every extension field element to its D-sized canonical representation. -pub fn flatten(l: &[F::Extension]) -> Vec +pub fn flatten(l: &[F::Extension]) -> Vec where - F: Extendable, + F: Field + Extendable, { l.iter() .flat_map(|x| x.to_basefield_array().to_vec()) @@ -135,9 +135,9 @@ where } /// Batch every D-sized chunks into extension field elements. -pub fn unflatten(l: &[F]) -> Vec +pub fn unflatten(l: &[F]) -> Vec where - F: Extendable, + F: Field + Extendable, { debug_assert_eq!(l.len() % D, 0); l.chunks_exact(D) diff --git a/plonky2/src/hash/poseidon.rs b/plonky2/src/hash/poseidon.rs index ae5a26c1..a7c76325 100644 --- a/plonky2/src/hash/poseidon.rs +++ b/plonky2/src/hash/poseidon.rs @@ -923,7 +923,7 @@ impl AlgebraicHasher for PoseidonHash { pub(crate) mod test_helpers { use super::*; - pub(crate) fn check_test_vectors( + pub(crate) fn check_test_vectors( test_vectors: Vec<([u64; SPONGE_WIDTH], [u64; SPONGE_WIDTH])>, ) where F: Poseidon, @@ -941,7 +941,7 @@ pub(crate) mod test_helpers { } } - pub(crate) fn check_consistency() + pub(crate) fn check_consistency() where F: Poseidon, { diff --git a/plonky2/src/iop/witness.rs b/plonky2/src/iop/witness.rs index 40377aa3..85af6ca4 100644 --- a/plonky2/src/iop/witness.rs +++ b/plonky2/src/iop/witness.rs @@ -14,7 +14,7 @@ use crate::iop::ext_target::ExtensionTarget; use crate::iop::target::{BoolTarget, Target}; use crate::iop::wire::Wire; use crate::plonk::circuit_data::{VerifierCircuitTarget, VerifierOnlyCircuitData}; -use crate::plonk::config::{AlgebraicHasher, GenericConfig, Hasher}; +use crate::plonk::config::{AlgebraicHasher, GenericConfig}; use crate::plonk::proof::{Proof, ProofTarget, ProofWithPublicInputs, ProofWithPublicInputsTarget}; pub trait WitnessWrite { @@ -222,7 +222,7 @@ pub trait Witness: WitnessWrite { } } - fn get_merkle_cap_target>(&self, cap_target: MerkleCapTarget) -> MerkleCap + fn get_merkle_cap_target(&self, cap_target: MerkleCapTarget) -> MerkleCap where F: RichField, H: AlgebraicHasher,