Skip to content

Commit

Permalink
Disable Serde's default-features
Browse files Browse the repository at this point in the history
With this patch, 'use-serde' will no longer compile serde/std. Serde/std
has been reexported as 'serde-std', for those who wish to continue to
use it.
  • Loading branch information
ass3rt committed Apr 6, 2022
1 parent cb4d34f commit 9cc4844
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Expand Up @@ -18,6 +18,7 @@ base64 = [ "base64-compat" ]
unstable = []
rand = ["secp256k1/rand-std"]
use-serde = ["serde", "bitcoin_hashes/serde", "secp256k1/serde"]
serde-std = ["serde/std"]
secp-lowmemory = ["secp256k1/lowmemory"]
secp-recovery = ["secp256k1/recovery"]

Expand All @@ -41,7 +42,7 @@ core2 = { version = "0.3.0", optional = true, default-features = false }

base64-compat = { version = "1.0.0", optional = true }
bitcoinconsensus = { version = "0.19.0-3", optional = true }
serde = { version = "1", features = [ "derive" ], optional = true }
serde = { version = "1", default-features = false, features = [ "derive" ], optional = true }
hashbrown = { version = "0.8", optional = true }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion contrib/test.sh
Expand Up @@ -93,7 +93,7 @@ if [ "$AS_DEPENDENCY" = true ]
then
cargo new dep_test
cd dep_test
echo 'bitcoin = { path = "..", features = ["use-serde"] }' >> Cargo.toml
echo 'bitcoin = { path = "..", features = ["use-serde", "serde-std"] }' >> Cargo.toml

# Pin `cc` for Rust 1.29
if [ -n "$PIN_VERSIONS" ]; then
Expand Down

0 comments on commit 9cc4844

Please sign in to comment.