Skip to content

Commit

Permalink
Fix outstanding compiler errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaker committed Jul 24, 2023
1 parent b43614f commit fdb1e5a
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 16 deletions.
3 changes: 1 addition & 2 deletions ec/src/scalar_mul/glv.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use crate::AdditiveGroup;
use crate::{
short_weierstrass::{Affine, Projective, SWCurveConfig},
CurveGroup,
AdditiveGroup, CurveGroup,
};
use ark_ff::{PrimeField, Zero};
use num_bigint::{BigInt, BigUint, Sign};
Expand Down
6 changes: 4 additions & 2 deletions ec/src/scalar_mul/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ pub mod wnaf;
pub mod fixed_base;
pub mod variable_base;

use crate::short_weierstrass::{Affine, Projective, SWCurveConfig};
use crate::PrimeGroup;
use crate::{
short_weierstrass::{Affine, Projective, SWCurveConfig},
PrimeGroup,
};
use ark_ff::{AdditiveGroup, Zero};
use ark_std::{
ops::{Add, AddAssign, Mul, Neg, Sub, SubAssign},
Expand Down
2 changes: 1 addition & 1 deletion ff-macros/src/montgomery/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub fn mont_config_helper(
let scope_name = format_ident!("{}___", config_name.to_string().to_lowercase());
quote::quote! {
fn #scope_name() {
use ark_ff::{fields::Fp, BigInt, BigInteger, biginteger::arithmetic as fa, fields::*};
use ark_ff::{AdditiveGroup, fields::Fp, BigInt, BigInteger, biginteger::arithmetic as fa, fields::*};
type B = BigInt<#limbs>;
type F = Fp<MontBackend<#config_name, #limbs>, #limbs>;

Expand Down
4 changes: 2 additions & 2 deletions ff/src/fields/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use ark_serialize::{
use ark_std::{
fmt::{Debug, Display},
hash::Hash,
ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Neg, Sub, SubAssign},
ops::{AddAssign, Div, DivAssign, MulAssign, Neg, SubAssign},
vec::Vec,
};

Expand Down Expand Up @@ -414,7 +414,7 @@ mod no_std_tests {
let felt2 = Fr::one() + Fr::one();
let felt16 = felt2 * felt2 * felt2 * felt2;

assert_eq!(Fr::from(1u8), Fr::one());
assert_eq!(Fr::from(1u8), Fr::one());
assert_eq!(Fr::from(1u16), Fr::one());
assert_eq!(Fr::from(1u32), Fr::one());
assert_eq!(Fr::from(1u64), Fr::one());
Expand Down
5 changes: 1 addition & 4 deletions ff/src/fields/models/fp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ use ark_std::{
mod montgomery_backend;
pub use montgomery_backend::*;

use crate::{
BigInt, BigInteger, FftField, Field, LegendreSymbol, PrimeField,
SqrtPrecomputation,
};
use crate::{BigInt, BigInteger, FftField, Field, LegendreSymbol, PrimeField, SqrtPrecomputation};
/// A trait that specifies the configuration of a prime field.
/// Also specifies how to perform arithmetic on field elements.
pub trait FpConfig<const N: usize>: Send + Sync + 'static + Sized {
Expand Down
1 change: 1 addition & 0 deletions ff/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub use bits::*;

pub(crate) mod const_helpers;

pub use ark_group::AdditiveGroup;
pub use ark_std::UniformRand;

mod to_field_vec;
Expand Down
2 changes: 1 addition & 1 deletion test-curves/src/bls12_381/fq2.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::bls12_381::*;
use ark_ff::{fields::*, MontFp};
use ark_ff::{fields::*, AdditiveGroup, MontFp};

pub type Fq2 = Fp2<Fq2Config>;

Expand Down
6 changes: 2 additions & 4 deletions test-curves/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
#![no_std]

pub use ark_ff;
pub use ark_ff::{fields::models::*, FftField, Field, LegendreSymbol, MontFp, PrimeField};
pub use ark_ff::{self, fields::models::*, FftField, Field, LegendreSymbol, MontFp, PrimeField};

pub use ark_ec;
pub use ark_ec::*;
pub use ark_ec::{self, *};

#[cfg(any(feature = "bls12_381_scalar_field", feature = "bls12_381_curve"))]
pub mod bls12_381;
Expand Down

0 comments on commit fdb1e5a

Please sign in to comment.