mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-03 14:23:07 +00:00
Trivial fixes from "cargo fix"
This commit is contained in:
parent
d6211b8ab8
commit
5c96e7b366
@ -13,7 +13,7 @@ enum FftStrategy {
|
||||
|
||||
const FFT_STRATEGY: FftStrategy = FftStrategy::Classic;
|
||||
|
||||
type FftRootTable<F: Field> = Vec<Vec<F>>;
|
||||
type FftRootTable<F> = Vec<Vec<F>>;
|
||||
|
||||
fn fft_classic_root_table<F: Field>(n: usize) -> FftRootTable<F> {
|
||||
let lg_n = log2_strict(n);
|
||||
|
||||
@ -3,7 +3,7 @@ use anyhow::{ensure, Result};
|
||||
use crate::field::extension_field::{Extendable, FieldExtension};
|
||||
use crate::field::field_types::Field;
|
||||
use crate::gates::gate::Gate;
|
||||
use crate::hash::hash_types::{HashOut, HashOutTarget};
|
||||
use crate::hash::hash_types::{HashOut};
|
||||
use crate::iop::witness::PartialWitness;
|
||||
use crate::plonk::circuit_builder::CircuitBuilder;
|
||||
use crate::plonk::circuit_data::CircuitConfig;
|
||||
|
||||
@ -244,7 +244,6 @@ mod tests {
|
||||
GateRef::new(GMiMCGate::<F, D, GMIMC_ROUNDS>::new_automatic_constants()),
|
||||
GateRef::new(InterpolationGate::new(4)),
|
||||
];
|
||||
let len = gates.len();
|
||||
|
||||
let (tree, _, _) = Tree::from_gates(gates.clone());
|
||||
let mut gates_with_prefix = tree.traversal();
|
||||
@ -277,7 +276,7 @@ mod tests {
|
||||
"Total degree is larger than 8."
|
||||
);
|
||||
|
||||
gates_with_prefix.sort_unstable_by_key(|(g, p)| p.len());
|
||||
gates_with_prefix.sort_unstable_by_key(|(_g, p)| p.len());
|
||||
for i in 0..gates_with_prefix.len() {
|
||||
for j in i + 1..gates_with_prefix.len() {
|
||||
assert_ne!(
|
||||
|
||||
@ -326,7 +326,7 @@ mod tests {
|
||||
use anyhow::Result;
|
||||
|
||||
use crate::field::crandall_field::CrandallField;
|
||||
use crate::field::extension_field::quartic::QuarticCrandallField;
|
||||
|
||||
use crate::field::field_types::Field;
|
||||
use crate::gates::gate::Gate;
|
||||
use crate::gates::gate_testing::{test_eval_fns, test_low_degree};
|
||||
|
||||
@ -301,7 +301,6 @@ impl<F: Extendable<D>, const D: usize> SimpleGenerator<F> for InsertionGenerator
|
||||
let mut insert_here_vals = vec![F::ZERO; vec_size];
|
||||
insert_here_vals.insert(insertion_index, F::ONE);
|
||||
|
||||
let mut result = GeneratedValues::<F>::with_capacity((vec_size + 1) * (D + 2));
|
||||
for i in 0..=vec_size {
|
||||
let output_wires = self.gate.wires_output_list_item(i).map(local_wire);
|
||||
out_buffer.set_ext_wires(output_wires, new_vec[i]);
|
||||
|
||||
@ -267,7 +267,6 @@ impl<F: Extendable<D>, const D: usize> SimpleGenerator<F> for InterpolationGener
|
||||
.collect::<Vec<_>>();
|
||||
let interpolant = interpolant(&points);
|
||||
|
||||
let mut result = GeneratedValues::<F>::with_capacity(D * (self.gate.num_points + 1));
|
||||
for (i, &coeff) in interpolant.coeffs.iter().enumerate() {
|
||||
let wires = self.gate.wires_coeff(i).map(local_wire);
|
||||
out_buffer.set_ext_wires(wires, coeff);
|
||||
|
||||
@ -56,7 +56,7 @@ impl<F: Extendable<D>, const D: usize> Gate<F, D> for NoopGate {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use anyhow::Result;
|
||||
|
||||
|
||||
use crate::field::crandall_field::CrandallField;
|
||||
use crate::gates::gate_testing::{test_eval_fns, test_low_degree};
|
||||
|
||||
@ -198,7 +198,6 @@ impl<F: Extendable<D>, const D: usize> SimpleGenerator<F> for ReducingGenerator<
|
||||
let output =
|
||||
ExtensionTarget::from_range(self.gate_index, ReducingGate::<D>::wires_output());
|
||||
|
||||
let mut result = GeneratedValues::<F>::with_capacity(self.gate.num_coeffs + 1);
|
||||
let mut acc = old_acc;
|
||||
for i in 0..self.gate.num_coeffs {
|
||||
let computed_acc = acc * alpha + coeffs[i].into();
|
||||
|
||||
@ -309,7 +309,7 @@ impl<F: Extendable<D>, const D: usize> CircuitBuilder<F, D> {
|
||||
// then the `ExtensionTarget` as a whole is constant.
|
||||
let const_coeffs: Vec<F> = target
|
||||
.0
|
||||
.into_iter()
|
||||
.iter()
|
||||
.filter_map(|&t| self.target_as_constant(t))
|
||||
.collect();
|
||||
|
||||
|
||||
@ -201,8 +201,6 @@ mod tests {
|
||||
fn division_by_z_h() {
|
||||
type F = CrandallField;
|
||||
let zero = F::ZERO;
|
||||
let one = F::ONE;
|
||||
let two = F::TWO;
|
||||
let three = F::from_canonical_u64(3);
|
||||
let four = F::from_canonical_u64(4);
|
||||
let five = F::from_canonical_u64(5);
|
||||
@ -229,7 +227,7 @@ mod tests {
|
||||
let ev = poly.eval(z);
|
||||
|
||||
let timer = Instant::now();
|
||||
let (quotient, ev2) = poly.div_rem(&PolynomialCoeffs::new(vec![-z, F::ONE]));
|
||||
let (_quotient, ev2) = poly.div_rem(&PolynomialCoeffs::new(vec![-z, F::ONE]));
|
||||
println!("{:.3}s for usual", timer.elapsed().as_secs_f32());
|
||||
assert_eq!(ev2.trimmed().coeffs, vec![ev]);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user