mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Make #[feature(test)] depend on #[cfg(all(test, feature = "bench"))].
* FIXES Issue #38: https://github.com/isislovecruft/curve25519-dalek/pull/38
This commit is contained in:
parent
3882a41d27
commit
f6930997d2
6 changed files with 8 additions and 6 deletions
|
|
@ -36,6 +36,7 @@ version = "0.4"
|
|||
default = ["std"]
|
||||
std = ["rand"]
|
||||
yolocrypto = []
|
||||
bench = []
|
||||
|
||||
# The development profile, used for `cargo build`.
|
||||
[profile.dev]
|
||||
|
|
|
|||
|
|
@ -1354,7 +1354,7 @@ mod test {
|
|||
// Benchmarks
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, feature = "bench"))]
|
||||
mod bench {
|
||||
use test::Bencher;
|
||||
use constants;
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ mod test {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, feature = "bench"))]
|
||||
mod bench {
|
||||
use rand::OsRng;
|
||||
use test::Bencher;
|
||||
|
|
|
|||
|
|
@ -1048,7 +1048,7 @@ mod test {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, feature = "bench"))]
|
||||
mod bench {
|
||||
use test::Bencher;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![cfg_attr(not(feature = "std"), feature(collections))]
|
||||
#![allow(unused_features)]
|
||||
#![feature(test)]
|
||||
#![cfg_attr(feature = "bench", feature(test))]
|
||||
#![deny(missing_docs)] // refuse to compile if documentation is missing
|
||||
|
||||
//! # curve25519-dalek
|
||||
|
|
@ -33,8 +33,9 @@
|
|||
//! hatred of the Daleks. Rusty destroys the other Daleks and departs the
|
||||
//! ship, determined to track down and bring an end to the Dalek race.
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, feature = "bench"))]
|
||||
extern crate test;
|
||||
|
||||
#[cfg(test)]
|
||||
extern crate sha2;
|
||||
|
||||
|
|
|
|||
|
|
@ -707,7 +707,7 @@ mod test {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
#[cfg(all(test, feature = "bench"))]
|
||||
mod bench {
|
||||
use rand::OsRng;
|
||||
use test::Bencher;
|
||||
|
|
|
|||
Loading…
Reference in a new issue