Fix a few warnings (#259)

This commit is contained in:
Jakub Nabaglo 2021-09-21 13:12:46 -07:00 committed by GitHub
parent 43cbb84cc9
commit 2f8286ff98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1 additions and 12 deletions

View File

@ -436,7 +436,6 @@ mod tests {
use crate::gates::gate::Gate;
use crate::gates::gate_testing::{test_eval_fns, test_low_degree};
use crate::hash::hash_types::HashOut;
use crate::plonk::plonk_common::reduce_with_powers;
use crate::plonk::vars::EvaluationVars;
#[test]

View File

@ -1,15 +1,10 @@
use std::collections::HashMap;
use anyhow::{ensure, Result};
use num::Integer;
use serde::{Deserialize, Serialize};
use crate::field::field_types::{Field, RichField};
use crate::hash::hash_types::HashOut;
use crate::hash::hashing::{compress, hash_or_noop};
use crate::hash::merkle_proofs::MerkleProof;
use crate::hash::merkle_tree::MerkleCap;
use crate::util::log2_strict;
/// Compress multiple Merkle proofs on the same tree by removing redundancy in the Merkle paths.
pub(crate) fn compress_merkle_proofs<F: Field>(
@ -62,7 +57,7 @@ pub(crate) fn decompress_merkle_proofs<F: RichField>(
cap_height: usize,
) -> Vec<MerkleProof<F>> {
let num_leaves = 1 << height;
let mut compressed_proofs = compressed_proofs.to_vec();
let compressed_proofs = compressed_proofs.to_vec();
let mut decompressed_proofs = Vec::with_capacity(compressed_proofs.len());
// Holds the already seen nodes in the tree along with their value.
let mut seen = HashMap::new();
@ -111,7 +106,6 @@ mod tests {
use super::*;
use crate::field::crandall_field::CrandallField;
use crate::field::field_types::Field;
use crate::hash::merkle_proofs::MerkleProof;
use crate::hash::merkle_tree::MerkleTree;
#[test]

View File

@ -620,7 +620,6 @@ impl<F: RichField + Extendable<D>, const D: usize> CircuitBuilder<F, D> {
};
// Index generator indices by their watched targets.
let max_target_index = partition_witness.forest.len();
let mut generator_indices_by_watches = BTreeMap::new();
for (i, generator) in self.generators.iter().enumerate() {
for watch in generator.watch_list() {

View File

@ -146,8 +146,6 @@ mod tests {
use anyhow::Result;
use crate::field::crandall_field::CrandallField;
use crate::field::extension_field::algebra::ExtensionAlgebra;
use crate::field::extension_field::quartic::QuarticExtension;
use crate::field::field_types::Field;
use crate::iop::witness::PartialWitness;
use crate::plonk::circuit_builder::CircuitBuilder;
@ -157,7 +155,6 @@ mod tests {
#[test]
fn test_proof_compression() -> Result<()> {
type F = CrandallField;
type FF = QuarticExtension<CrandallField>;
const D: usize = 4;
let config = CircuitConfig::large_config();