Pacify clippy (#1547)

This commit is contained in:
Robin Salen 2024-02-28 15:21:34 +09:00 committed by GitHub
parent cc464cbc87
commit 0817fd8e98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 8 deletions

View File

@ -125,9 +125,9 @@ impl<F: Field> FieldExtension<1> for F {
}
/// Flatten the slice by sending every extension field element to its D-sized canonical representation.
pub fn flatten<F: Field, const D: usize>(l: &[F::Extension]) -> Vec<F>
pub fn flatten<F, const D: usize>(l: &[F::Extension]) -> Vec<F>
where
F: Extendable<D>,
F: Field + Extendable<D>,
{
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<F: Field, const D: usize>(l: &[F]) -> Vec<F::Extension>
pub fn unflatten<F, const D: usize>(l: &[F]) -> Vec<F::Extension>
where
F: Extendable<D>,
F: Field + Extendable<D>,
{
debug_assert_eq!(l.len() % D, 0);
l.chunks_exact(D)

View File

@ -923,7 +923,7 @@ impl<F: RichField> AlgebraicHasher<F> for PoseidonHash {
pub(crate) mod test_helpers {
use super::*;
pub(crate) fn check_test_vectors<F: Field>(
pub(crate) fn check_test_vectors<F>(
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<F: Field>()
pub(crate) fn check_consistency<F>()
where
F: Poseidon,
{

View File

@ -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<F: Field> {
@ -222,7 +222,7 @@ pub trait Witness<F: Field>: WitnessWrite<F> {
}
}
fn get_merkle_cap_target<H: Hasher<F>>(&self, cap_target: MerkleCapTarget) -> MerkleCap<F, H>
fn get_merkle_cap_target<H>(&self, cap_target: MerkleCapTarget) -> MerkleCap<F, H>
where
F: RichField,
H: AlgebraicHasher<F>,