diff --git a/crypto-primitives/src/merkle_tree/mod.rs b/crypto-primitives/src/merkle_tree/mod.rs index ea1f8df..27b248e 100644 --- a/crypto-primitives/src/merkle_tree/mod.rs +++ b/crypto-primitives/src/merkle_tree/mod.rs @@ -372,7 +372,7 @@ mod test { merkle_tree::*, }; use algebra::curves::jubjub::JubJubAffine as JubJub; - use num_traits::Zero; + use algebra::Zero; use rand::SeedableRng; use rand_xorshift::XorShiftRng; diff --git a/crypto-primitives/src/nizk/mod.rs b/crypto-primitives/src/nizk/mod.rs index 1c30bc7..fc40af5 100644 --- a/crypto-primitives/src/nizk/mod.rs +++ b/crypto-primitives/src/nizk/mod.rs @@ -60,7 +60,7 @@ mod test { fn test_gm17() { use crate::nizk::{gm17::Gm17, NIZK}; use algebra::{curves::bls12_381::Bls12_381, fields::bls12_381::Fr}; - use num_traits::One; + use algebra::One; use r1cs_core::{ConstraintSynthesizer, ConstraintSystem, SynthesisError}; #[derive(Copy, Clone)] diff --git a/crypto-primitives/src/signature/schnorr/mod.rs b/crypto-primitives/src/signature/schnorr/mod.rs index 9e03e05..2356f20 100644 --- a/crypto-primitives/src/signature/schnorr/mod.rs +++ b/crypto-primitives/src/signature/schnorr/mod.rs @@ -6,7 +6,7 @@ use algebra::{ to_bytes, ToConstraintField, UniformRand, }; use digest::Digest; -use num_traits::{One, Zero}; +use algebra::{One, Zero}; use rand::Rng; use std::{ hash::Hash, diff --git a/r1cs-std/src/bits/boolean.rs b/r1cs-std/src/bits/boolean.rs index 64f9f44..4dcde6a 100644 --- a/r1cs-std/src/bits/boolean.rs +++ b/r1cs-std/src/bits/boolean.rs @@ -837,7 +837,7 @@ mod test { use super::{AllocatedBit, Boolean}; use crate::{prelude::*, test_constraint_system::TestConstraintSystem}; use algebra::{fields::bls12_381::Fr, BitIterator, Field, PrimeField, UniformRand}; - use num_traits::{One, Zero}; + use algebra::{One, Zero}; use r1cs_core::ConstraintSystem; use rand::SeedableRng; use rand_xorshift::XorShiftRng; diff --git a/r1cs-std/src/bits/uint32.rs b/r1cs-std/src/bits/uint32.rs index eb42a32..719352f 100644 --- a/r1cs-std/src/bits/uint32.rs +++ b/r1cs-std/src/bits/uint32.rs @@ -345,7 +345,7 @@ mod test { use super::UInt32; use crate::{bits::boolean::Boolean, test_constraint_system::TestConstraintSystem}; use algebra::fields::bls12_381::Fr; - use num_traits::{One, Zero}; + use algebra::{One, Zero}; use r1cs_core::ConstraintSystem; use rand::{Rng, SeedableRng}; use rand_xorshift::XorShiftRng; diff --git a/r1cs-std/src/fields/fp12.rs b/r1cs-std/src/fields/fp12.rs index 1ae353a..7f8cf80 100644 --- a/r1cs-std/src/fields/fp12.rs +++ b/r1cs-std/src/fields/fp12.rs @@ -8,7 +8,7 @@ use algebra::{ }, BitIterator, Field, PrimeField, }; -use num_traits::One; +use algebra::One; use std::{borrow::Borrow, marker::PhantomData}; use crate::{prelude::*, Assignment}; diff --git a/r1cs-std/src/groups/curves/short_weierstrass/bls12/mod.rs b/r1cs-std/src/groups/curves/short_weierstrass/bls12/mod.rs index 7c5ee8b..6c7d383 100644 --- a/r1cs-std/src/groups/curves/short_weierstrass/bls12/mod.rs +++ b/r1cs-std/src/groups/curves/short_weierstrass/bls12/mod.rs @@ -3,7 +3,7 @@ use algebra::{ fields::Field, BitIterator, ProjectiveCurve, }; -use num_traits::One; +use algebra::One; use r1cs_core::{ConstraintSystem, SynthesisError}; use crate::{ diff --git a/r1cs-std/src/groups/curves/short_weierstrass/mod.rs b/r1cs-std/src/groups/curves/short_weierstrass/mod.rs index 77801b0..967f047 100644 --- a/r1cs-std/src/groups/curves/short_weierstrass/mod.rs +++ b/r1cs-std/src/groups/curves/short_weierstrass/mod.rs @@ -5,7 +5,7 @@ use algebra::{ }, AffineCurve, BitIterator, Field, PrimeField, ProjectiveCurve, }; -use num_traits::{One, Zero}; +use algebra::{One, Zero}; use r1cs_core::{ConstraintSystem, SynthesisError}; use std::{borrow::Borrow, marker::PhantomData, ops::Neg}; diff --git a/r1cs-std/src/groups/curves/twisted_edwards/mod.rs b/r1cs-std/src/groups/curves/twisted_edwards/mod.rs index 720a8d9..d5c3751 100644 --- a/r1cs-std/src/groups/curves/twisted_edwards/mod.rs +++ b/r1cs-std/src/groups/curves/twisted_edwards/mod.rs @@ -5,7 +5,7 @@ use algebra::{ }, BitIterator, Field, }; -use num_traits::{One, Zero}; +use algebra::{One, Zero}; use r1cs_core::{ConstraintSystem, SynthesisError}; diff --git a/r1cs-std/src/pairing/mod.rs b/r1cs-std/src/pairing/mod.rs index 353dab3..48d943d 100644 --- a/r1cs-std/src/pairing/mod.rs +++ b/r1cs-std/src/pairing/mod.rs @@ -60,7 +60,7 @@ mod test { // use rand; use crate::test_constraint_system::TestConstraintSystem; use algebra::{BitIterator, Field}; - use num_traits::One; + use algebra::One; use r1cs_core::ConstraintSystem; #[test]