Start on implementing filtering support for Cursor::prev

This commit is contained in:
Antonio Scandurra 2022-03-15 13:25:54 +01:00
parent 7c6fe56347
commit 45ce503afd
5 changed files with 65 additions and 91 deletions

View file

@ -242,10 +242,10 @@ impl<T: Item> SumTree<T> {
extent
}
pub fn summary(&self) -> T::Summary {
pub fn summary(&self) -> &T::Summary {
match self.0.as_ref() {
Node::Internal { summary, .. } => summary.clone(),
Node::Leaf { summary, .. } => summary.clone(),
Node::Internal { summary, .. } => summary,
Node::Leaf { summary, .. } => summary,
}
}