Skip to content

Commit

Permalink
Merge pull request #62 from worldcoin/ewoolsey/derive
Browse files Browse the repository at this point in the history
Derived Deserialize for Proof using associated type bound
  • Loading branch information
0xKitsune authored Feb 5, 2024
2 parents 239d182 + 9ca581b commit 08b9fd7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/merkle_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ pub enum Branch<H: Hasher> {
}

/// Merkle proof path, bottom to top.
#[derive(Clone, PartialEq, Eq, Serialize)]
#[derive(Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(bound(deserialize = "H::Hash: Deserialize<'de>",))]
pub struct Proof<H: Hasher>(pub Vec<Branch<H>>);

/// For a given node index, return the parent node index
Expand Down

0 comments on commit 08b9fd7

Please sign in to comment.