From a2b019f82321fd395c7a6ab5cdfd138b7cd10145 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 4 Apr 2024 08:18:51 +1100 Subject: [PATCH] Enable internals "alloc" feature We have 2 crates that require an allocator, `bitcoin` and `base58ck` - these crates should enable the "alloc" feature when depending on `internals`. For `units` we use the `internals::error::InputString` but do not enable the "alloc" feature - this is a bug, it means that the parsed string is being lost from the error types that use `InputString`. Enable "alloc" for `bitcoin`, `base58ck`, and `units`. - `bitcoin` and `base56ck` is just for good measure so we don't get bitten later on. - `units` is a bug fix and requires a point release. --- base58/Cargo.toml | 2 +- bitcoin/Cargo.toml | 2 +- units/Cargo.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base58/Cargo.toml b/base58/Cargo.toml index c83a11b5..61fe35a0 100644 --- a/base58/Cargo.toml +++ b/base58/Cargo.toml @@ -22,7 +22,7 @@ rustdoc-args = ["--cfg", "docsrs"] [dependencies] hashes = { package = "bitcoin_hashes", version = "0.14.0", default-features = false, features = ["alloc"] } -internals = { package = "bitcoin-internals", version = "0.3.0" } +internals = { package = "bitcoin-internals", version = "0.3.0", features = ["alloc"] } [dev-dependencies] hex = { package = "hex-conservative", version = "0.2.0", default-features = false, features = ["alloc"] } diff --git a/bitcoin/Cargo.toml b/bitcoin/Cargo.toml index cb343929..5aaf6a56 100644 --- a/bitcoin/Cargo.toml +++ b/bitcoin/Cargo.toml @@ -33,7 +33,7 @@ bech32 = { version = "0.11.0", default-features = false, features = ["alloc"] } hashes = { package = "bitcoin_hashes", version = "0.14.0", default-features = false, features = ["alloc", "io"] } hex = { package = "hex-conservative", version = "0.2.0", default-features = false, features = ["alloc"] } hex_lit = "0.1.1" -internals = { package = "bitcoin-internals", version = "0.3.0" } +internals = { package = "bitcoin-internals", version = "0.3.0", features = ["alloc"] } io = { package = "bitcoin-io", version = "0.1.1", default-features = false, features = ["alloc"] } secp256k1 = { version = "0.29.0", default-features = false, features = ["hashes", "alloc"] } units = { package = "bitcoin-units", version = "0.1.0", default-features = false, features = ["alloc"] } diff --git a/units/Cargo.toml b/units/Cargo.toml index 51b968d1..157f3082 100644 --- a/units/Cargo.toml +++ b/units/Cargo.toml @@ -22,7 +22,7 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [dependencies] -internals = { package = "bitcoin-internals", version = "0.3.0" } +internals = { package = "bitcoin-internals", version = "0.3.0", features = ["alloc"] } serde = { version = "1.0.103", default-features = false, features = ["derive"], optional = true }