From ee5ce45c5f6eee703b65019703ae3acc4a25c02a Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 8 Apr 2024 09:25:34 +1000 Subject: [PATCH] Add hashes 0.14 to the dependency range We just release a new version of `bitcoin_hashes` which works with `bip39` with no changes. Add `bitcoin_hashes v0.14` to the dependency range and document its effect on the MSRV. (Note, the "alloc" feature is required as of 0.14). --- Cargo.toml | 4 ++-- README.md | 1 + src/internal_macros.rs | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) 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,