Skip to content

Commit

Permalink
Merge #571: backport: fix rand-std feature for old cargo versions
Browse files Browse the repository at this point in the history
66a8c39 backport: fix rand-std feature for old cargo versions (Andrew Poelstra)

Pull request description:

  There is a bugfix rust-lang/cargo#8395 which appears in cargo 1.46, after our MSRV of 1.41. This means that under 1.41, users of the rand-std feature may nondeterministically see compilation fail.

  In particular, users of rust-bitcoin 0.29 seem to have started seeing failures starting on 2023-01-12, where the 'rand-std' feature would be enabled in this library but 'rand' was not.

  This commit simply makes the 'rand' dependency explicit, to avoid the nondeterministic bug in cargo's feature resolver.

  Fixes rust-bitcoin/rust-bitcoin#1546

ACKs for top commit:
  sanket1729:
    code review ACK 66a8c39

Tree-SHA512: 896198dd4050bd8f4a71b345e5691ffddf99f6d5a6fdd2e37bf5032359fcb41ee6c8d966de4f90762e93516b2fc654985a8f25edf113d4ced5b06d9a23742e55
  • Loading branch information
apoelstra committed Jan 13, 2023
2 parents 959bd25 + 66a8c39 commit a1fb038
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "secp256k1"
version = "0.24.2"
version = "0.24.3"
authors = [ "Dawid Ciężarkiewicz <dpc@ucore.info>",
"Andrew Poelstra <apoelstra@wpsoftware.net>" ]
license = "CC0-1.0"
Expand All @@ -23,7 +23,7 @@ std = ["alloc", "secp256k1-sys/std"]
# allow use of Secp256k1::new and related API that requires an allocator
alloc = ["secp256k1-sys/alloc"]
bitcoin-hashes-std = ["bitcoin_hashes/std"]
rand-std = ["rand/std", "rand/std_rng"]
rand-std = ["rand", "rand/std", "rand/std_rng"]
recovery = ["secp256k1-sys/recovery"]
lowmemory = ["secp256k1-sys/lowmemory"]
global-context = ["std"]
Expand Down

0 comments on commit a1fb038

Please sign in to comment.