diff --git a/Cargo.toml b/Cargo.toml index b74804a..8f37f0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ homepage = "https://github.com/mit-dci/rustreexo" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -bitcoin_hashes = "0.12.0" +bitcoin_hashes = "0.14" serde = { version = "1.0", features = ["derive"], optional = true } [dev-dependencies] diff --git a/src/accumulator/node_hash.rs b/src/accumulator/node_hash.rs index 83c1309..edb5988 100644 --- a/src/accumulator/node_hash.rs +++ b/src/accumulator/node_hash.rs @@ -131,7 +131,7 @@ impl From<&[u8; 32]> for NodeHash { } #[cfg(test)] impl TryFrom<&str> for NodeHash { - type Error = hex::Error; + type Error = hex::HexToArrayError; fn try_from(hash: &str) -> Result { // This implementation is useful for testing, as it allows to create empty hashes // from the string of 64 zeros. Without this, it would be impossible to express this @@ -146,7 +146,7 @@ impl TryFrom<&str> for NodeHash { #[cfg(not(test))] impl TryFrom<&str> for NodeHash { - type Error = hex::Error; + type Error = hex::HexToArrayError; fn try_from(hash: &str) -> Result { let inner = hex::FromHex::from_hex(hash)?; Ok(NodeHash::Some(inner)) @@ -169,7 +169,7 @@ impl FromStr for NodeHash { fn from_str(s: &str) -> Result { NodeHash::try_from(s) } - type Err = hex::Error; + type Err = hex::HexToArrayError; } impl NodeHash { /// Tells whether this hash is empty. We use empty hashes throughout the code to represent