From 6dfe4a4129412ef10b216975457899405d5f73ba Mon Sep 17 00:00:00 2001 From: Sean Bowe Date: Thu, 14 Nov 2019 10:55:16 -0700 Subject: [PATCH] Remove unnecessary feature guard flag guard. --- src/pairings.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pairings.rs b/src/pairings.rs index 7af452813..43658c181 100644 --- a/src/pairings.rs +++ b/src/pairings.rs @@ -6,7 +6,7 @@ use core::ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign}; use subtle::{Choice, ConditionallySelectable, ConstantTimeEq}; -#[cfg(all(feature = "pairings", feature = "alloc"))] +#[cfg(feature = "alloc")] use alloc::vec::Vec; /// Represents results of a Miller loop, one of the most expensive portions @@ -219,7 +219,7 @@ impl<'a, 'b> Mul<&'b Scalar> for &'a Gt { impl_binops_additive!(Gt, Gt); impl_binops_multiplicative!(Gt, Scalar); -#[cfg(all(feature = "pairings", feature = "alloc"))] +#[cfg(feature = "alloc")] #[derive(Clone, Debug)] /// This structure contains cached computations pertaining to a $\mathbb{G}_2$ /// element as part of the pairing function (specifically, the Miller loop) and @@ -235,7 +235,7 @@ pub struct G2Prepared { coeffs: Vec<(Fp2, Fp2, Fp2)>, } -#[cfg(all(feature = "pairings", feature = "alloc"))] +#[cfg(feature = "alloc")] impl From for G2Prepared { fn from(q: G2Affine) -> G2Prepared { struct Adder { @@ -286,7 +286,7 @@ impl From for G2Prepared { } } -#[cfg(all(feature = "pairings", feature = "alloc"))] +#[cfg(feature = "alloc")] /// Computes $$\sum_{i=1}^n \textbf{ML}(a_i, b_i)$$ given a series of terms /// $$(a_1, b_1), (a_2, b_2), ..., (a_n, b_n).$$ /// @@ -544,7 +544,7 @@ fn test_unitary() { assert_eq!(q, r); } -#[cfg(all(feature = "pairings", feature = "alloc"))] +#[cfg(feature = "alloc")] #[test] fn test_multi_miller_loop() { let a1 = G1Affine::generator();