diff --git a/dusk-merkle/CHANGELOG.md b/dusk-merkle/CHANGELOG.md index 823008b..c523704 100644 --- a/dusk-merkle/CHANGELOG.md +++ b/dusk-merkle/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Added +- Add `Default` implementation for `Tree` - Add bounds check on `Tree::insert`, improving panic message [#91] ## [0.5.2] - 2023-10-27 diff --git a/dusk-merkle/src/tree.rs b/dusk-merkle/src/tree.rs index eeaf7d9..d01439c 100644 --- a/dusk-merkle/src/tree.rs +++ b/dusk-merkle/src/tree.rs @@ -21,6 +21,15 @@ pub struct Tree { positions: BTreeSet, } +impl Default for Tree +where + T: Aggregate, +{ + fn default() -> Self { + Self::new() + } +} + impl Tree where T: Aggregate,