Feature gate recovery module

This commit is contained in:
Jonas Nick 2019-05-20 19:41:10 +00:00
parent 264b368ee0
commit c7eecd159e
4 changed files with 6 additions and 3 deletions

View File

@ -24,10 +24,11 @@ script:
- cargo build --verbose --features=rand
- cargo test --verbose --features=rand
- cargo test --verbose --features="rand serde"
- cargo test --verbose --features="rand serde recovery"
- cargo build --verbose --no-default-features
- cargo build --verbose --no-default-features --features="serde"
- cargo build --verbose --no-default-features --features="rand"
- cargo build --verbose --no-default-features --features="rand serde"
- cargo build --verbose --no-default-features --features="rand serde recovery"
- cargo build --verbose
- cargo test --verbose
- cargo build --release

View File

@ -15,7 +15,7 @@ build = "build.rs"
# Should make docs.rs show all functions, even those behind non-default features
[package.metadata.docs.rs]
features = [ "rand", "serde" ]
features = [ "rand", "serde", "recovery" ]
all-features = true
[build-dependencies]
@ -30,6 +30,7 @@ unstable = []
default = ["std"]
fuzztarget = []
std = []
recovery = []
[dev-dependencies]
rand = "0.6"

View File

@ -152,6 +152,7 @@ pub mod constants;
pub mod ecdh;
pub mod ffi;
pub mod key;
#[cfg(feature = "recovery")]
pub mod recovery;
pub use key::SecretKey;

View File

@ -174,7 +174,7 @@ impl<C: Verification> Secp256k1<C> {
mod tests {
use rand::{RngCore, thread_rng};
use key::{SecretKey, PublicKey};
use key::SecretKey;
use super::{RecoveryId, RecoverableSignature};
use super::super::{Secp256k1, Message};
use super::super::Error::{IncorrectSignature, InvalidSignature};