mirror of
https://github.com/arnaucube/Nova.git
synced 2026-01-19 04:11:31 +01:00
PrimeField --> ff::PrimeField (#28)
* PrimeField --> ff::PrimeField * cargo fmt
This commit is contained in:
@@ -5,7 +5,7 @@ use std::{
|
||||
collections::{BTreeMap, HashMap},
|
||||
};
|
||||
|
||||
use crate::traits::{Group, PrimeField as PF};
|
||||
use crate::traits::Group;
|
||||
use ff::{Field, PrimeField};
|
||||
|
||||
use bellperson::{ConstraintSystem, Index, LinearCombination, SynthesisError, Variable};
|
||||
@@ -142,7 +142,7 @@ where
|
||||
s.push_str(&format!("INPUT {}\n", &input))
|
||||
}
|
||||
|
||||
let negone = -<G::Scalar as PF>::one();
|
||||
let negone = -<G::Scalar>::one();
|
||||
|
||||
let powers_of_two = (0..G::Scalar::NUM_BITS)
|
||||
.map(|i| G::Scalar::from(2u64).pow_vartime(&[u64::from(i)]))
|
||||
@@ -159,7 +159,7 @@ where
|
||||
}
|
||||
is_first = false;
|
||||
|
||||
if coeff != <G::Scalar as PF>::one() && coeff != negone {
|
||||
if coeff != <G::Scalar>::one() && coeff != negone {
|
||||
for (i, x) in powers_of_two.iter().enumerate() {
|
||||
if x == &coeff {
|
||||
s.push_str(&format!("2^{} . ", i));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Support for generating R1CS witness using bellperson.
|
||||
|
||||
use crate::traits::{Group, PrimeField as PF};
|
||||
use ff::PrimeField;
|
||||
use crate::traits::Group;
|
||||
use ff::{Field, PrimeField};
|
||||
|
||||
use bellperson::{
|
||||
multiexp::DensityTracker, ConstraintSystem, Index, LinearCombination, SynthesisError, Variable,
|
||||
|
||||
Reference in New Issue
Block a user