cargo fix --edition for bellman

This commit is contained in:
Eirik Ogilvie-Wigley 2019-08-16 22:58:05 -06:00
parent e59738b4ee
commit 4991e53f48
7 changed files with 18 additions and 18 deletions

View File

@ -401,7 +401,7 @@ mod test {
]);
for _ in 0..1000 {
let mut v = (0..32)
let v = (0..32)
.map(|_| Boolean::constant(rng.next_u32() % 2 != 0))
.collect::<Vec<_>>();
@ -436,7 +436,7 @@ mod test {
]);
for _ in 0..1000 {
let mut v = (0..32)
let v = (0..32)
.map(|_| Boolean::constant(rng.next_u32() % 2 != 0))
.collect::<Vec<_>>();

View File

@ -8,11 +8,11 @@ use pairing::Engine;
use super::{Parameters, VerifyingKey};
use {Circuit, ConstraintSystem, Index, LinearCombination, SynthesisError, Variable};
use crate::{Circuit, ConstraintSystem, Index, LinearCombination, SynthesisError, Variable};
use domain::{EvaluationDomain, Scalar};
use crate::domain::{EvaluationDomain, Scalar};
use multicore::Worker;
use crate::multicore::Worker;
/// Generates a random common reference string for
/// a circuit.

View File

@ -1,10 +1,10 @@
use group::{CurveAffine, EncodedPoint};
use pairing::{Engine, PairingCurveAffine};
use SynthesisError;
use crate::SynthesisError;
use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
use multiexp::SourceBuilder;
use crate::multiexp::SourceBuilder;
use std::io::{self, Read, Write};
use std::sync::Arc;
@ -465,7 +465,7 @@ impl<'a, E: Engine> ParameterSource<E> for &'a Parameters<E> {
#[cfg(test)]
mod test_with_bls12_381 {
use super::*;
use {Circuit, ConstraintSystem, SynthesisError};
use crate::{Circuit, ConstraintSystem, SynthesisError};
use ff::Field;
use pairing::bls12_381::{Bls12, Fr};

View File

@ -10,13 +10,13 @@ use pairing::Engine;
use super::{ParameterSource, Proof};
use {Circuit, ConstraintSystem, Index, LinearCombination, SynthesisError, Variable};
use crate::{Circuit, ConstraintSystem, Index, LinearCombination, SynthesisError, Variable};
use domain::{EvaluationDomain, Scalar};
use crate::domain::{EvaluationDomain, Scalar};
use multiexp::{multiexp, DensityTracker, FullDensity};
use crate::multiexp::{multiexp, DensityTracker, FullDensity};
use multicore::Worker;
use crate::multicore::Worker;
fn eval<E: Engine>(
lc: &LinearCombination<E>,

View File

@ -6,7 +6,7 @@ use self::dummy_engine::*;
use std::marker::PhantomData;
use {Circuit, ConstraintSystem, SynthesisError};
use crate::{Circuit, ConstraintSystem, SynthesisError};
use super::{create_proof, generate_parameters, prepare_verifying_key, verify_proof};

View File

@ -4,7 +4,7 @@ use pairing::{Engine, PairingCurveAffine};
use super::{PreparedVerifyingKey, Proof, VerifyingKey};
use SynthesisError;
use crate::SynthesisError;
pub fn prepare_verifying_key<E: Engine>(vk: &VerifyingKey<E>) -> PreparedVerifyingKey<E> {
let mut gamma = vk.gamma_g2;

View File

@ -90,12 +90,12 @@ impl<'a, E: Engine> Circuit<E> for MiMCDemo<'a, E> {
let cs = &mut cs.namespace(|| format!("round {}", i));
// tmp = (xL + Ci)^2
let mut tmp_value = xl_value.map(|mut e| {
let tmp_value = xl_value.map(|mut e| {
e.add_assign(&self.constants[i]);
e.square();
e
});
let mut tmp = cs.alloc(
let tmp = cs.alloc(
|| "tmp",
|| tmp_value.ok_or(SynthesisError::AssignmentMissing),
)?;
@ -110,14 +110,14 @@ impl<'a, E: Engine> Circuit<E> for MiMCDemo<'a, E> {
// new_xL = xR + (xL + Ci)^3
// new_xL = xR + tmp * (xL + Ci)
// new_xL - xR = tmp * (xL + Ci)
let mut new_xl_value = xl_value.map(|mut e| {
let new_xl_value = xl_value.map(|mut e| {
e.add_assign(&self.constants[i]);
e.mul_assign(&tmp_value.unwrap());
e.add_assign(&xr_value.unwrap());
e
});
let mut new_xl = if i == (MIMC_ROUNDS - 1) {
let new_xl = if i == (MIMC_ROUNDS - 1) {
// This is the last round, xL is our image and so
// we allocate a public input.
cs.alloc_input(