From 3c9dd2fb326b4ffe9680885d1de79904499a4043 Mon Sep 17 00:00:00 2001 From: Tobin Harding Date: Wed, 9 Feb 2022 06:22:04 +0000 Subject: [PATCH] Fix example dependency list 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". --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index c007c98..ffadff7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,7 +42,7 @@ //! trigger any assertion failures in the upstream library. //! //! ```rust -//! # #[cfg(all(feature="rand", feature="bitcoin_hashes", any(feature = "alloc", feature = "std")))] { +//! # #[cfg(all(feature = "std", feature="rand-std", feature="bitcoin_hashes"))] { //! use secp256k1::rand::rngs::OsRng; //! use secp256k1::{Secp256k1, Message}; //! use secp256k1::hashes::sha256;