mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-03 06:13:07 +00:00
Pacify clippy (#1547)
This commit is contained in:
parent
cc464cbc87
commit
0817fd8e98
@ -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)
|
||||
|
||||
@ -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,
|
||||
{
|
||||
|
||||
@ -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>,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user