Skip to content

Commit

Permalink
Added Default impl to FreeformTree
Browse files Browse the repository at this point in the history
Was missing due to an oversight, saw it during the refactor.
  • Loading branch information
kotauskas committed Mar 12, 2021
1 parent 951f849 commit d0c737a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/freeform_tree/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,14 @@ where
self.storage.is_dense()
}
}

impl<B, L, K, S> Default for FreeformTree<B, L, K, S>
where
L: Default,
S: Storage<Element = Node<B, L, K>, Key = K>,
K: Clone + Debug + Eq,
{
fn default() -> Self {
Self::new(L::default())
}
}

0 comments on commit d0c737a

Please sign in to comment.