Skip to content

Commit dfde5c6

Browse files
Merge rust-bitcoin/rust-secp256k1#397: Fix example dependency list
3c9dd2fb326b4ffe9680885d1de79904499a4043 Fix example dependency list (Tobin Harding) Pull request description: Example relies on `rand-std` not plain `rand` dependency. I do not understand why the following command passes without this patch applied ``` cargo test --no-default-features --features=std,rand,bitcoin_hashes ``` But if we put the same code in a standalone binary it fails as expected? Since the running of this test is _unusual_ and it is primarily meant as an entry point example to the library, remove the mention of "alloc" feature and just depend upon "std". Fixes: #395 ACKs for top commit: apoelstra: ACK 3c9dd2fb326b4ffe9680885d1de79904499a4043 Tree-SHA512: 8e7ec7ac846e2916c29b74c7485650e5242ae1141c12c69b50d74efdfee71c11a52cd454231d2a7cdd6f8f683d3ba4369f9bf898a6b9351dc92c2a4e2bd626cd
2 parents df68fe5 + 43bf206 commit dfde5c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
//! trigger any assertion failures in the upstream library.
4343
//!
4444
//! ```rust
45-
//! # #[cfg(all(feature="rand", feature="bitcoin_hashes", any(feature = "alloc", feature = "std")))] {
45+
//! # #[cfg(all(feature = "std", feature="rand-std", feature="bitcoin_hashes"))] {
4646
//! use secp256k1::rand::rngs::OsRng;
4747
//! use secp256k1::{Secp256k1, Message};
4848
//! use secp256k1::hashes::sha256;

0 commit comments

Comments
 (0)