From 85f3e827451e18c21f110068b4322fb99d2f0a8c Mon Sep 17 00:00:00 2001 From: sinu <65924192+sinui0@users.noreply.github.com> Date: Mon, 30 Sep 2024 06:48:15 -0700 Subject: [PATCH] feat: Debug and Clone derives --- src/merkle_proof.rs | 1 + src/merkle_tree.rs | 2 +- src/partial_tree.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/merkle_proof.rs b/src/merkle_proof.rs index 3f294a6..007ab76 100644 --- a/src/merkle_proof.rs +++ b/src/merkle_proof.rs @@ -47,6 +47,7 @@ use core::convert::TryFrom; /// /// [`Hasher`]: crate::Hasher /// [`algorithms::Sha256`]: crate::algorithms::Sha256 +#[derive(Debug, Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct MerkleProof { proof_hashes: Vec, diff --git a/src/merkle_tree.rs b/src/merkle_tree.rs index 952e3da..4da3cae 100644 --- a/src/merkle_tree.rs +++ b/src/merkle_tree.rs @@ -14,7 +14,7 @@ use crate::{ /// Advanced features include being able to make transactional changes to a tree with being able to /// roll back to any previously committed state of the tree. This scenario is similar to Git and /// can be found in databases and file systems. -#[derive(Clone)] +#[derive(Debug, Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct MerkleTree { current_working_tree: PartialTree, diff --git a/src/partial_tree.rs b/src/partial_tree.rs index 6f4eae3..4609b6a 100644 --- a/src/partial_tree.rs +++ b/src/partial_tree.rs @@ -11,7 +11,7 @@ type PartialTreeLayer = Vec<(usize, H)>; /// /// [`MerkleTree`]: crate::MerkleTree /// [`MerkleProof`]: crate::MerkleProof -#[derive(Clone)] +#[derive(Debug, Clone)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct PartialTree { layers: Vec>,