Skip to content

Commit

Permalink
Add hashes 0.14 to the dependency range
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
tcharding committed Apr 7, 2024
1 parent 93d3484 commit ee5ce45
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions src/internal_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -34,6 +35,7 @@ macro_rules! serde_string_impl {
self.visit_str(v)
}

#[cfg(feature = "alloc")]
fn visit_string<E>(self, v: String) -> Result<Self::Value, E>
where
E: $crate::serde::de::Error,
Expand Down

0 comments on commit ee5ce45

Please sign in to comment.