diff --git a/Cargo.toml b/Cargo.toml index f4605c0..41cfa5f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,11 +49,11 @@ serde = { version = "1.0", default-features = false, features = [ "alloc" ], opt zeroize = { version = "1.5", features = ["zeroize_derive"], optional = true } # Unexported dependnecies -bitcoin_hashes = { version = ">=0.12, <=0.13", default-features = false } +bitcoin_hashes = { version = ">=0.12, <=0.14", default-features = false, features = ["alloc"] } unicode-normalization = { version = "=0.1.22", default-features = false, optional = true } [dev-dependencies] -bitcoin_hashes = ">=0.12,<0.14" # enable default features for test +bitcoin_hashes = ">=0.12,<=0.14" # enable default features for test [package.metadata.docs.rs] diff --git a/README.md b/README.md index c97c10d..ccc5c0f 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ The `bitcoin_hashes` range dependency effects the MSRV as follows - `bitcoin_hashes v0.12`: MSRV v1.41.1 - `bitcoin_hashes v0.13`: MSRV v1.48.0 +- `bitcoin_hashes v0.14`: MSRV v1.56.1 When using older version of Rust, you might have to pin the version of the `bitcoin_hashes` crate used as such: diff --git a/src/internal_macros.rs b/src/internal_macros.rs index 4d4ece1..707effe 100644 --- a/src/internal_macros.rs +++ b/src/internal_macros.rs @@ -10,6 +10,7 @@ macro_rules! serde_string_impl { { use core::fmt::{self, Formatter}; use core::str::FromStr; + #[cfg(feature = "alloc")] use alloc::string::String; struct Visitor; @@ -34,6 +35,7 @@ macro_rules! serde_string_impl { self.visit_str(v) } + #[cfg(feature = "alloc")] fn visit_string(self, v: String) -> Result where E: $crate::serde::de::Error,