Skip to content

Commit

Permalink
Add rand-std feature
Browse files Browse the repository at this point in the history
In test code imported from `rust-bitcoin` we feature gate on the
`rand-std` feature but forgot to add it. Recent compiler upgrade found
this for us.

Add a `rand-std` feature that enables `rand-std` in the `bitcoin`
dependency.

While we are at it add a `lints` section to the manifest.
  • Loading branch information
tcharding committed Aug 22, 2024
1 parent 5527a85 commit 457c2af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ rustdoc-args = ["--cfg", "docsrs"]
default = ["std"]
std = ["bitcoin/std"]
no-std = ["bitcoin/no-std", "core2"]
rand-std = ["bitcoin/rand-std"]
serde = ["actual-serde", "bitcoin/serde"]
base64 = ["bitcoin/base64"]

Expand Down Expand Up @@ -55,3 +56,6 @@ required-features = ["std"]
[[example]]
name = "v2-separate-creator-constructor"
required-features = ["std"]

[lints.rust]
unexpected_cfgs = { level = "deny", check-cfg = ['cfg(rust_v_1_60)'] }
2 changes: 1 addition & 1 deletion src/v0/bitcoin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1930,7 +1930,7 @@ mod tests {
let secp = Secp256k1::new();

let sk = SecretKey::new(&mut thread_rng());
let priv_key = PrivateKey::new(sk, crate::Network::Regtest);
let priv_key = PrivateKey::new(sk, bitcoin::Network::Regtest);
let pk = PublicKey::from_private_key(&secp, &priv_key);

(priv_key, pk, secp)
Expand Down

0 comments on commit 457c2af

Please sign in to comment.