Move cfgs into outer module.

This commit is contained in:
Henry de Valence 2019-02-11 07:25:16 -08:00
parent 00675b4c56
commit 5daff66079
2 changed files with 1 additions and 8 deletions

View file

@ -21,4 +21,5 @@ pub mod variable_base;
#[cfg(feature = "stage2_build")] #[cfg(feature = "stage2_build")]
pub mod vartime_double_base; pub mod vartime_double_base;
#[cfg(feature = "alloc")]
pub mod straus; pub mod straus;

View file

@ -12,16 +12,11 @@
#![allow(non_snake_case)] #![allow(non_snake_case)]
#[cfg(any(feature = "alloc", feature = "std"))]
use core::borrow::Borrow; use core::borrow::Borrow;
#[cfg(any(feature = "alloc", feature = "std"))]
use edwards::EdwardsPoint; use edwards::EdwardsPoint;
#[cfg(any(feature = "alloc", feature = "std"))]
use scalar::Scalar; use scalar::Scalar;
#[cfg(any(feature = "alloc", feature = "std"))]
use traits::MultiscalarMul; use traits::MultiscalarMul;
#[cfg(any(feature = "alloc", feature = "std"))]
use traits::VartimeMultiscalarMul; use traits::VartimeMultiscalarMul;
#[allow(unused_imports)] #[allow(unused_imports)]
@ -48,10 +43,8 @@ use prelude::*;
/// ///
/// [solution]: https://www.jstor.org/stable/2310929 /// [solution]: https://www.jstor.org/stable/2310929
/// [problem]: https://www.jstor.org/stable/2312273 /// [problem]: https://www.jstor.org/stable/2312273
#[cfg(any(feature = "alloc", feature = "std"))]
pub struct Straus {} pub struct Straus {}
#[cfg(feature = "alloc")]
impl MultiscalarMul for Straus { impl MultiscalarMul for Straus {
type Point = EdwardsPoint; type Point = EdwardsPoint;
@ -148,7 +141,6 @@ impl MultiscalarMul for Straus {
} }
} }
#[cfg(feature = "alloc")]
impl VartimeMultiscalarMul for Straus { impl VartimeMultiscalarMul for Straus {
type Point = EdwardsPoint; type Point = EdwardsPoint;