diff --git a/Cargo.toml b/Cargo.toml index cc4327ec..893550e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ crate-type = ["lib"] [features] default = [] # Exposes utils useful for testing -testing-utils = [] +testing-utils = ["paste"] [dependencies] rand = "0.6" @@ -27,6 +27,7 @@ digest = "0.8.1" hex = "^0.3" blake2b_simd = "0.5.7" derivative = "2.1.1" +paste = { version = "1.0.2", optional = true } [dependencies.rust-gmp-kzen] version = "0.5.0" diff --git a/src/lib.rs b/src/lib.rs index a21aca34..15549394 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -101,7 +101,7 @@ macro_rules! test_for_all_curves { $crate::test_for_all_curves!([] $fn); }; ([$($attrs:tt)*] $fn: ident) => { - paste::paste!{ + $crate::paste!{ #[test] $($attrs)* fn [<$fn _secp256k1>]() { @@ -130,3 +130,8 @@ macro_rules! test_for_all_curves { } }; } + +/// Re-exporting macro to use in `test_for_all_curves!` +#[cfg(any(test, feature="testing-utils"))] +#[doc(hidden)] +pub use paste::paste;