diff --git a/src/namespaced_hash.rs b/src/namespaced_hash.rs index f9e1df5..c504c2e 100644 --- a/src/namespaced_hash.rs +++ b/src/namespaced_hash.rs @@ -197,9 +197,7 @@ pub struct NamespacedHash { #[cfg(any(test, feature = "borsh"))] impl borsh::BorshDeserialize for NamespacedHash { - fn deserialize_reader( - reader: &mut R, - ) -> std::io::Result { + fn deserialize_reader(reader: &mut R) -> std::io::Result { let mut min_ns = NamespaceId([0u8; NS_ID_SIZE]); reader.read_exact(&mut min_ns.0)?; @@ -404,8 +402,7 @@ mod tests { fn test_namespaced_hash_borsh() { let hash = NamespacedHash::<8>::try_from([8u8; 48].as_ref()).unwrap(); - let serialized = borsh::to_vec(&hash) - .expect("Serialization to vec must succeed"); + let serialized = borsh::to_vec(&hash).expect("Serialization to vec must succeed"); let got = NamespacedHash::deserialize(&mut &serialized[..]).expect("serialized hash is correct"); diff --git a/src/simple_merkle/tree.rs b/src/simple_merkle/tree.rs index 07aa2a1..f30e99a 100644 --- a/src/simple_merkle/tree.rs +++ b/src/simple_merkle/tree.rs @@ -81,28 +81,28 @@ pub trait MerkleHash { #[cfg(all(not(feature = "serde"), feature = "borsh", feature = "std"))] type Output: Debug - + PartialEq - + Eq - + Clone - + Default - + Hash - + Ord - + borsh::BorshSerialize - + borsh::BorshDeserialize; + + PartialEq + + Eq + + Clone + + Default + + Hash + + Ord + + borsh::BorshSerialize + + borsh::BorshDeserialize; /// The output of this hasher #[cfg(all(feature = "serde", feature = "borsh", feature = "std"))] type Output: Debug - + PartialEq - + Eq - + Clone - + Default - + Hash - + Ord - + serde::Serialize - + serde::de::DeserializeOwned - + borsh::BorshSerialize - + borsh::BorshDeserialize; + + PartialEq + + Eq + + Clone + + Default + + Hash + + Ord + + serde::Serialize + + serde::de::DeserializeOwned + + borsh::BorshSerialize + + borsh::BorshDeserialize; /// The hash of the empty tree. This is often defined as the hash of the empty string const EMPTY_ROOT: Self::Output;