From 29c9f98745e26b63ef6b1c6ca8447977ac86187d Mon Sep 17 00:00:00 2001 From: Alexey Shekhirin Date: Wed, 4 Dec 2024 15:25:41 +0000 Subject: [PATCH] feat: derive `Clone` for `HashBuilder` (#72) feat: derive Clone for HashBuilder --- src/hash_builder/mod.rs | 2 +- src/proof/retainer.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hash_builder/mod.rs b/src/hash_builder/mod.rs index 17a17a1..c9ab172 100644 --- a/src/hash_builder/mod.rs +++ b/src/hash_builder/mod.rs @@ -39,7 +39,7 @@ pub use value::{HashBuilderValue, HashBuilderValueRef}; /// up, combining the hashes of child nodes and ultimately generating the root hash. The root hash /// can then be used to verify the integrity and authenticity of the trie's data by constructing and /// verifying Merkle proofs. -#[derive(Debug, Default)] +#[derive(Debug, Clone, Default)] #[allow(missing_docs)] pub struct HashBuilder { pub key: Nibbles, diff --git a/src/proof/retainer.rs b/src/proof/retainer.rs index fd4d50f..0c5d74f 100644 --- a/src/proof/retainer.rs +++ b/src/proof/retainer.rs @@ -6,7 +6,7 @@ use alloc::vec::Vec; /// Proof retainer is used to store proofs during merkle trie construction. /// It is intended to be used within the [`HashBuilder`](crate::HashBuilder). -#[derive(Default, Debug)] +#[derive(Default, Clone, Debug)] pub struct ProofRetainer { /// The nibbles of the target trie keys to retain proofs for. targets: Vec,