mirror of https://github.com/zcash/halo2.git
Apply clippy and fmt
This commit is contained in:
parent
7190c5829f
commit
641b4b5f94
|
@ -100,6 +100,7 @@ impl FromStr for Poly {
|
|||
|
||||
#[derive(Debug)]
|
||||
struct Lookup {
|
||||
#[allow(dead_code)]
|
||||
columns: usize,
|
||||
input_deg: usize,
|
||||
table_deg: usize,
|
||||
|
|
|
@ -43,7 +43,6 @@ trait StandardCs<FF: FieldExt> {
|
|||
#[derive(Clone)]
|
||||
struct MyCircuit<F: FieldExt> {
|
||||
a: Option<F>,
|
||||
zero: Option<F>,
|
||||
k: u32,
|
||||
}
|
||||
|
||||
|
@ -168,11 +167,7 @@ impl<F: FieldExt> Circuit<F> for MyCircuit<F> {
|
|||
type FloorPlanner = SimpleFloorPlanner;
|
||||
|
||||
fn without_witnesses(&self) -> Self {
|
||||
Self {
|
||||
a: None,
|
||||
zero: None,
|
||||
k: self.k,
|
||||
}
|
||||
Self { a: None, k: self.k }
|
||||
}
|
||||
|
||||
fn configure(meta: &mut ConstraintSystem<F>) -> PlonkConfig {
|
||||
|
@ -247,11 +242,7 @@ fn main() {
|
|||
let k = 8;
|
||||
let public_inputs_size = 0;
|
||||
|
||||
let empty_circuit: MyCircuit<Fp> = MyCircuit {
|
||||
a: None,
|
||||
zero: None,
|
||||
k,
|
||||
};
|
||||
let empty_circuit: MyCircuit<Fp> = MyCircuit { a: None, k };
|
||||
|
||||
// Initialize the polynomial commitment parameters
|
||||
let params: Params<G1Affine> = Params::<G1Affine>::unsafe_setup::<Bn256>(k);
|
||||
|
@ -263,7 +254,6 @@ fn main() {
|
|||
|
||||
let circuit: MyCircuit<Fp> = MyCircuit {
|
||||
a: Some(Fp::from(5)),
|
||||
zero: Some(Fp::zero()),
|
||||
k,
|
||||
};
|
||||
|
||||
|
|
|
@ -72,9 +72,6 @@ struct FieldConfig {
|
|||
// This is important when building larger circuits, where columns are used by
|
||||
// multiple sets of instructions.
|
||||
s_mul: Selector,
|
||||
|
||||
/// The fixed column used to load constants.
|
||||
constant: Column<Fixed>,
|
||||
}
|
||||
|
||||
impl<F: FieldExt> FieldChip<F> {
|
||||
|
@ -132,7 +129,6 @@ impl<F: FieldExt> FieldChip<F> {
|
|||
advice,
|
||||
instance,
|
||||
s_mul,
|
||||
constant,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -326,7 +326,7 @@ mod tests {
|
|||
{
|
||||
let poly = &polynomials[i][j];
|
||||
let commitment: &G1Affine = &commitments[i][j];
|
||||
let eval = eval_polynomial(&poly, *point);
|
||||
let eval = eval_polynomial(poly, *point);
|
||||
let query = VerifierQuery::new_commitment(commitment, *point, eval);
|
||||
verifier_queries.push(query);
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ where
|
|||
// 4. find diff points
|
||||
// commitment_id_diff_points_map = { c_1: { p_2, p_3, ... }, c_2: { p_0 }, ... }
|
||||
let mut commitment_id_diff_points_map = BTreeMap::new();
|
||||
for query in queries.clone() {
|
||||
for query in queries {
|
||||
let id = get_commitment_id(&query);
|
||||
let commitment_point_set = commitment_id_point_map.get(&id).unwrap();
|
||||
|
||||
|
@ -320,8 +320,7 @@ mod tests {
|
|||
|
||||
let points = vec_to_set(points);
|
||||
let diffs = vec_to_set(diffs);
|
||||
let intersection: Vec<Fr> = points.intersection(&diffs).cloned().collect();
|
||||
assert_eq!(intersection.len(), 0);
|
||||
assert_eq!(points.intersection(&diffs).cloned().count(), 0);
|
||||
let union: Vec<Fr> = points.union(&diffs).cloned().collect();
|
||||
assert_eq!(union, super_point_set);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue