diff --git a/src/proof.rs b/src/proof.rs index 176b39e..cfe6636 100644 --- a/src/proof.rs +++ b/src/proof.rs @@ -8,11 +8,17 @@ use tree::Tree; /// An inclusion proof represent the fact that a `value` is a member /// of a `MerkleTree` with root hash `root_hash`, and hash function `algorithm`. -#[cfg_attr(feature = "serialization-serde", derive(Serialize, Deserialize))] +#[cfg_attr( + feature = "serialization-serde", + derive(Serialize, Deserialize) +)] #[derive(Clone, Debug)] pub struct Proof { /// The hashing algorithm used in the original `MerkleTree` - #[cfg_attr(feature = "serialization-serde", serde(with = "algorithm_serde"))] + #[cfg_attr( + feature = "serialization-serde", + serde(with = "algorithm_serde") + )] pub algorithm: &'static Algorithm, /// The hash of the root of the original `MerkleTree` @@ -151,7 +157,10 @@ impl Proof { /// A `Lemma` holds the hash of a node, the hash of its sibling node, /// and a sub lemma, whose `node_hash`, when combined with this `sibling_hash` /// must be equal to this `node_hash`. -#[cfg_attr(feature = "serialization-serde", derive(Serialize, Deserialize))] +#[cfg_attr( + feature = "serialization-serde", + derive(Serialize, Deserialize) +)] #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Lemma { pub node_hash: Vec, @@ -238,7 +247,10 @@ impl Lemma { } /// Tags a value so that we know from which branch of a `Tree` (if any) it was found. -#[cfg_attr(feature = "serialization-serde", derive(Serialize, Deserialize))] +#[cfg_attr( + feature = "serialization-serde", + derive(Serialize, Deserialize) +)] #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum Positioned { /// The value was found in the left branch