Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/ecdh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ mod tests {
}

#[cfg(bench)]
#[cfg(feature = "rand-std")] // Currently only a single bench that requires "rand-std".
mod benches {
use test::{Bencher, black_box};

Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,7 @@ mod benches {
use super::{Message, Secp256k1};

#[bench]
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg(all(feature = "std", feature = "rnd-std"))]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rand-std should imply std so just rand-std should be sufficient but currently it's not the case - this is a bug. Also you seem to be missing a, so if you're going to fix it anyway might as well add std to the Cargo.toml list.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol, this broken change makes the PR title amusing :)

pub fn generate(bh: &mut Bencher) {

let s = Secp256k1::new();
Expand All @@ -1071,7 +1071,7 @@ mod benches {
}

#[bench]
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg(all(feature = "std", feature = "rnd-std"))]
pub fn bench_sign_ecdsa(bh: &mut Bencher) {
let s = Secp256k1::new();
let mut msg = [0u8; 32];
Expand All @@ -1086,7 +1086,7 @@ mod benches {
}

#[bench]
#[cfg(any(feature = "alloc", feature = "std"))]
#[cfg(all(feature = "std", feature = "rnd-std"))]
pub fn bench_verify_ecdsa(bh: &mut Bencher) {
let s = Secp256k1::new();
let mut msg = [0u8; 32];
Expand Down