Skip to content

Commit

Permalink
brought back Vec imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mskrzypkows committed Apr 25, 2024
1 parent 9bf0df8 commit 2a32654
Show file tree
Hide file tree
Showing 20 changed files with 23 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/alloc.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use ark_ff::Field;
use ark_relations::r1cs::{Namespace, SynthesisError};
use ark_std::vec::Vec;
use core::borrow::Borrow;

/// Describes the mode that a variable should be allocated in within
Expand Down
1 change: 1 addition & 0 deletions src/convert.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use ark_ff::Field;
use ark_relations::r1cs::SynthesisError;
use ark_std::vec::Vec;

use crate::{boolean::Boolean, uint8::UInt8};

Expand Down
1 change: 1 addition & 0 deletions src/eq.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::prelude::*;
use ark_ff::{Field, PrimeField};
use ark_relations::r1cs::SynthesisError;
use ark_std::vec::Vec;

/// Specifies how to generate constraints that check for equality for two
/// variables of type `Self`.
Expand Down
1 change: 1 addition & 0 deletions src/fields/cubic_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use ark_ff::{
CubicExtConfig, Zero,
};
use ark_relations::r1cs::{ConstraintSystemRef, Namespace, SynthesisError};
use ark_std::vec::Vec;
use core::{borrow::Borrow, marker::PhantomData};

use crate::{convert::ToConstraintFieldGadget, fields::fp::FpVar, prelude::*};
Expand Down
1 change: 1 addition & 0 deletions src/fields/emulated_fp/allocated_field_var.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use ark_std::{
cmp::{max, min},
marker::PhantomData,
vec,
vec::Vec,
};

/// The allocated version of `EmulatedFpVar` (introduced below)
Expand Down
2 changes: 1 addition & 1 deletion src/fields/emulated_fp/allocated_mul_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use ark_relations::{
ns,
r1cs::{ConstraintSystemRef, OptimizationGoal, Result as R1CSResult},
};
use ark_std::marker::PhantomData;
use ark_std::{marker::PhantomData, vec::Vec};
use num_bigint::BigUint;

/// The allocated form of `MulResultVar` (introduced below)
Expand Down
1 change: 1 addition & 0 deletions src/fields/emulated_fp/field_var.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use ark_relations::r1cs::{ConstraintSystemRef, Namespace, Result as R1CSResult,
use ark_std::{
borrow::Borrow,
hash::{Hash, Hasher},
vec::Vec,
};

/// A gadget for representing non-native (`TargetF`) field elements over the
Expand Down
2 changes: 1 addition & 1 deletion src/fields/emulated_fp/reduce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use ark_relations::{
ns,
r1cs::{ConstraintSystemRef, Result as R1CSResult},
};
use ark_std::{cmp::min, marker::PhantomData, vec};
use ark_std::{cmp::min, marker::PhantomData, vec, vec::Vec};
use num_bigint::BigUint;
use num_integer::Integer;

Expand Down
2 changes: 1 addition & 1 deletion src/fields/fp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use ark_relations::r1cs::{
use core::borrow::Borrow;

use crate::{boolean::AllocatedBool, convert::ToConstraintFieldGadget, prelude::*, Assignment};
use ark_std::iter::Sum;
use ark_std::{iter::Sum, vec::Vec};

mod cmp;

Expand Down
1 change: 1 addition & 0 deletions src/fields/quadratic_extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use ark_ff::{
Zero,
};
use ark_relations::r1cs::{ConstraintSystemRef, Namespace, SynthesisError};
use ark_std::vec::Vec;
use core::{borrow::Borrow, marker::PhantomData};

use crate::{convert::ToConstraintFieldGadget, fields::fp::FpVar, prelude::*};
Expand Down
1 change: 1 addition & 0 deletions src/groups/curves/short_weierstrass/mnt4/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use ark_ec::mnt4::{
};
use ark_ff::Field;
use ark_relations::r1cs::{Namespace, SynthesisError};
use ark_std::vec::Vec;

use crate::{
fields::{fp::FpVar, fp2::Fp2Var},
Expand Down
1 change: 1 addition & 0 deletions src/groups/curves/short_weierstrass/mnt6/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use ark_ec::mnt6::{
};
use ark_ff::Field;
use ark_relations::r1cs::{Namespace, SynthesisError};
use ark_std::vec::Vec;

use crate::{
fields::{fp::FpVar, fp3::Fp3Var},
Expand Down
2 changes: 1 addition & 1 deletion src/groups/curves/twisted_edwards/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use ark_relations::r1cs::{ConstraintSystemRef, Namespace, SynthesisError};
use crate::{convert::ToConstraintFieldGadget, fields::emulated_fp::EmulatedFpVar, prelude::*};

use crate::fields::fp::FpVar;
use ark_std::{borrow::Borrow, marker::PhantomData, ops::Mul};
use ark_std::{borrow::Borrow, marker::PhantomData, ops::Mul, vec::Vec};

type BasePrimeField<P> = <<P as CurveConfig>::BaseField as Field>::BasePrimeField;

Expand Down
1 change: 1 addition & 0 deletions src/poly/domain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use crate::{
};
use ark_ff::PrimeField;
use ark_relations::r1cs::SynthesisError;
use ark_std::vec::Vec;

pub mod vanishing_poly;

Expand Down
1 change: 1 addition & 0 deletions src/poly/evaluations/univariate/lagrange_interpolator.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::poly::domain::vanishing_poly::VanishingPolynomial;
use ark_ff::{batch_inversion_and_mul, PrimeField};
use ark_std::vec::Vec;
/// Struct describing Lagrange interpolation for a multiplicative coset I,
/// with |I| a power of 2.
/// TODO: Pull in lagrange poly explanation from libiop
Expand Down
5 changes: 4 additions & 1 deletion src/poly/evaluations/univariate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ use crate::{
};
use ark_ff::{batch_inversion, PrimeField};
use ark_relations::r1cs::SynthesisError;
use ark_std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
use ark_std::{
ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign},
vec::Vec,
};

#[derive(Clone)]
/// Stores a UV polynomial in evaluation form.
Expand Down
1 change: 1 addition & 0 deletions src/poly/polynomial/univariate/dense.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use ark_ff::PrimeField;
use ark_relations::r1cs::SynthesisError;
use ark_std::vec::Vec;

use crate::fields::{fp::FpVar, FieldVar};

Expand Down
1 change: 1 addition & 0 deletions src/r1cs_var.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use ark_ff::Field;
use ark_relations::r1cs::{ConstraintSystemRef, SynthesisError};
use ark_std::vec::Vec;

/// This trait describes some core functionality that is common to high-level
/// variables, such as `Boolean`s, `FieldVar`s, `GroupVar`s, etc.
Expand Down
1 change: 1 addition & 0 deletions src/select.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::prelude::*;
use ark_ff::Field;
use ark_relations::r1cs::SynthesisError;
use ark_std::vec::Vec;
/// Generates constraints for selecting between one of two values.
pub trait CondSelectGadget<ConstraintF: Field>: Sized + Clone {
/// If `cond == &Boolean::TRUE`, then this returns `true_value`; else,
Expand Down
2 changes: 1 addition & 1 deletion src/uint8.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use ark_ff::{Field, PrimeField, ToConstraintField};

use ark_relations::r1cs::{Namespace, SynthesisError};
use ark_std::vec::Vec;

use crate::{
convert::ToConstraintFieldGadget,
Expand Down

0 comments on commit 2a32654

Please sign in to comment.