Skip to content

Commit 979702d

Browse files
committed
Suite macro workaround for ring proof
1 parent a0433cd commit 979702d

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/utils/mod.rs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
//! Features expected to land into Arkworks at some point in the future
22
3+
/// Common utilities
4+
pub(crate) mod common;
35
/// Twisted Edwards to Short Weierstrass mapping.
46
pub(crate) mod te_sw_map;
5-
// Common utilities
6-
pub(crate) mod common;
77

88
pub(crate) use common::*;
99

1010
pub use te_sw_map::{sw_to_te, te_to_sw, SWMapping, TEMapping};
1111

12+
// Prevents downstream warnings when `ring` feature is not enabled.
13+
#[doc(hidden)]
14+
#[cfg(feature = "ring")]
15+
pub type RingProof<S> = crate::ring::Proof<S>;
16+
#[doc(hidden)]
17+
#[cfg(not(feature = "ring"))]
18+
pub type RingProof<S> = core::marker::PhantomData<S>;
19+
1220
#[macro_export]
1321
macro_rules! suite_types {
1422
($suite:ident) => {
@@ -30,8 +38,7 @@ macro_rules! suite_types {
3038
pub type IetfProof = $crate::ietf::Proof<$suite>;
3139
#[allow(dead_code)]
3240
pub type PedersenProof = $crate::pedersen::Proof<$suite>;
33-
#[cfg(feature = "ring")]
34-
#[allow(dead_code, unexpected_cfgs)]
35-
pub type RingProof = $crate::ring::Proof<$suite>;
41+
#[allow(dead_code)]
42+
pub type RingProof = $crate::utils::RingProof<$suite>;
3643
};
3744
}

0 commit comments

Comments
 (0)