From ca8e7767739a144cc5a960df990915efa58d9ca7 Mon Sep 17 00:00:00 2001 From: Preston Evans Date: Thu, 25 Apr 2024 08:52:52 -0500 Subject: [PATCH] Fix warnings --- src/lib.rs | 4 ++-- src/tendermint_hash.rs | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index bde298a..3810495 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,7 +22,7 @@ mod maybestd { #[cfg(not(feature = "std"))] pub use core::{cmp, fmt, hash, marker, mem, ops}; #[cfg(feature = "std")] - pub use std::{boxed, cmp, collections, fmt, format, hash, marker, mem, ops, string, vec}; + pub use std::{boxed, cmp, fmt, hash, marker, mem, ops, vec}; pub mod hash_or_btree_map { #[cfg(not(feature = "std"))] @@ -417,7 +417,7 @@ pub enum RangeProofType { #[cfg(test)] mod tests { - use crate::maybestd::{format, vec::Vec}; + use crate::maybestd::vec::Vec; use crate::NamespaceMerkleHasher; use crate::{ namespaced_hash::{NamespaceId, NamespacedSha2Hasher}, diff --git a/src/tendermint_hash.rs b/src/tendermint_hash.rs index 46f3461..0e877b1 100644 --- a/src/tendermint_hash.rs +++ b/src/tendermint_hash.rs @@ -24,6 +24,12 @@ fn inner_hash(left: &[u8], right: &[u8]) -> [u8; 32] { /// A sha256 hasher, compatible with [Tendermint merkle hash](https://github.com/informalsystems/tendermint-rs/blob/979456c9f33463944f97f7ea3900640e59f7ea6d/tendermint/src/merkle.rs) pub struct TmSha2Hasher; +impl Default for TmSha2Hasher { + fn default() -> Self { + Self::new() + } +} + impl TmSha2Hasher { /// Create a new instance of the hasher pub fn new() -> Self {