Skip to content

Commit 04f58a4

Browse files
committed
fmt
1 parent feb2579 commit 04f58a4

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

merkle_tree/src/internal.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ impl<T: NodeValue> super::MerkleProof<T> for MerkleTreeProof<T> {
102102
/// * `pos` - zero-based index of the leaf in the tree
103103
/// * `element` - the leaf value, None if verifying a non-membership proof
104104
/// * `proof` - a membership proof for `element` at given `pos`
105-
/// * `returns` - Ok(SUCCESS) if the proof is accepted, Ok(FAIL) if not. Err() if
106-
/// the proof is not well structured, E.g. not for this merkle tree.
105+
/// * `returns` - Ok(SUCCESS) if the proof is accepted, Ok(FAIL) if not. Err()
106+
/// if the proof is not well structured, E.g. not for this merkle tree.
107107
pub(crate) fn verify_merkle_proof<E, H, I, const ARITY: usize, T>(
108108
commitment: &T,
109109
pos: &I,
@@ -197,8 +197,8 @@ pub struct MerkleTreeRangeProof<T: NodeValue> {
197197
/// * `indices` - zero-based indices of the leaves in the tree
198198
/// * `element` - the leaf values in the range
199199
/// * `proof` - a range proof for `[start, end]`
200-
/// * `returns` - Ok(SUCCESS) if the proof is accepted, Ok(FAIL) if not. Err() if
201-
/// the proof is not well structured, E.g. not for this merkle tree.
200+
/// * `returns` - Ok(SUCCESS) if the proof is accepted, Ok(FAIL) if not. Err()
201+
/// if the proof is not well structured, E.g. not for this merkle tree.
202202
pub fn verify_merkle_range_proof<E, H, I, const ARITY: usize, T>(
203203
commitment: &T,
204204
indices: &[impl Borrow<I>],

merkle_tree/src/lib.rs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,9 @@ pub trait MerkleTreeScheme: Sized {
214214
/// * `pos` - zero-based index of the leaf in the tree
215215
/// * `element` - the leaf value
216216
/// * `proof` - a membership proof for `element` at given `pos`
217-
/// * `returns` - Ok(SUCCESS) if the proof is accepted, Ok(FAIL) if not. Err()
218-
/// if the proof is not well structured, E.g. not for this merkle tree.
217+
/// * `returns` - Ok(SUCCESS) if the proof is accepted, Ok(FAIL) if not.
218+
/// Err() if the proof is not well structured, E.g. not for this merkle
219+
/// tree.
219220
fn verify(
220221
commitment: impl Borrow<Self::Commitment>,
221222
pos: impl Borrow<Self::Index>,
@@ -260,8 +261,9 @@ pub trait RangeProofMerkleTreeScheme: MerkleTreeScheme {
260261
/// * `indices` - zero-based indices of the leaves in the tree
261262
/// * `elements` - the leaf values in the range
262263
/// * `proof` - a range membership proof for the given range
263-
/// * `returns` - Ok(SUCCESS) if the proof is accepted, Ok(FAIL) if not. Err()
264-
/// if the proof is not well structured, E.g. not for this merkle tree.
264+
/// * `returns` - Ok(SUCCESS) if the proof is accepted, Ok(FAIL) if not.
265+
/// Err() if the proof is not well structured, E.g. not for this merkle
266+
/// tree.
265267
///
266268
/// NOTE: all indices are needed here because we cannot generate them from
267269
/// [start, end] under the current Index trait bound.
@@ -365,8 +367,9 @@ pub trait UniversalMerkleTreeScheme: MerkleTreeScheme {
365367
/// Verify an index is not in this merkle tree
366368
/// * `pos` - zero-based index of the leaf in the tree
367369
/// * `proof` - a merkle tree proof
368-
/// * `returns` - Ok(SUCCESS) if the proof is accepted, Ok(FAIL) if not. Err()
369-
/// if the proof is not well structured, E.g. not for this merkle tree.
370+
/// * `returns` - Ok(SUCCESS) if the proof is accepted, Ok(FAIL) if not.
371+
/// Err() if the proof is not well structured, E.g. not for this merkle
372+
/// tree.
370373
fn non_membership_verify(
371374
commitment: impl Borrow<Self::Commitment>,
372375
pos: impl Borrow<Self::Index>,

0 commit comments

Comments
 (0)