Skip to content

Commit ebcc7ce

Browse files
authored
Make MerkleTree Sync (#38)
* Make MerkleTree Sync * Bump version to 0.2.5 Signed-off-by: Maciej Zwoliński <[email protected]>
1 parent e837b2f commit ebcc7ce

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "nmt-rs"
3-
version = "0.2.4"
3+
version = "0.2.5"
44
edition = "2021"
55
description = "A namespaced merkle tree compatible with Celestia"
66
license = "MIT OR Apache-2.0"

src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,4 +843,11 @@ mod tests {
843843

844844
is_send(DefaultNmt::<1>::new());
845845
}
846+
847+
#[allow(unused)]
848+
fn compilation_test_nmt_is_sync() {
849+
fn is_sync<T: Sync>(_t: T) {}
850+
851+
is_sync(DefaultNmt::<1>::new());
852+
}
846853
}

src/simple_merkle/tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl<T> TakeFirst<T> for [T] {
3030
}
3131
}
3232

33-
type BoxedVisitor<M> = Box<dyn Fn(&<M as MerkleHash>::Output) + Send>;
33+
type BoxedVisitor<M> = Box<dyn Fn(&<M as MerkleHash>::Output) + Send + Sync>;
3434

3535
/// Helper data structure for immutable data used during proof narrowing recursion.
3636
/// All indices are relative to the leaves of the entire tree.

0 commit comments

Comments
 (0)