diff --git a/src/bridgetree.rs b/src/bridgetree.rs index 460f1c7..dc5411c 100644 --- a/src/bridgetree.rs +++ b/src/bridgetree.rs @@ -106,7 +106,7 @@ impl From for Position { } /// A set of leaves of a Merkle tree. -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub enum Leaf { Left(A), Right(A, A), @@ -124,7 +124,7 @@ impl Leaf { /// A `[NonEmptyFrontier]` is a reduced representation of a Merkle tree, /// having either one or two leaf values, and then a set of hashes produced /// by the reduction of previously appended leaf values. -#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct NonEmptyFrontier { position: Position, leaf: Leaf, @@ -329,7 +329,7 @@ impl NonEmptyFrontier { /// A possibly-empty Merkle frontier. Used when the /// full functionality of a Merkle bridge is not necessary. -#[derive(Debug, Clone, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] pub struct Frontier { frontier: Option>, }