From 1f821d34a54ee489a6347afe4578e6ce10d2a761 Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Fri, 19 Jan 2018 17:08:12 -0800 Subject: [PATCH] Feature-gate batch inversion and compression on alloc --- src/field.rs | 1 + src/ristretto.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/field.rs b/src/field.rs index 23362e8..e6f2587 100644 --- a/src/field.rs +++ b/src/field.rs @@ -184,6 +184,7 @@ impl FieldElement { /// /// This function is most efficient when the batch size (slice /// length) is a power of 2. + #[cfg(any(feature = "alloc", feature = "std"))] pub fn batch_invert(inputs: &mut [FieldElement]) { // First, compute the product of all inputs using a product // tree: diff --git a/src/ristretto.rs b/src/ristretto.rs index 50f9b96..ee6260e 100644 --- a/src/ristretto.rs +++ b/src/ristretto.rs @@ -667,6 +667,7 @@ impl RistrettoPoint { } /// Double-and-compress a batch of points. + #[cfg(any(feature = "alloc", feature = "std"))] pub fn double_and_compress_batch<'a, I>(points: I) -> Vec where I: IntoIterator {