fix: reduce heap alloc

This commit is contained in:
Zixuan Chen 2022-10-31 20:40:39 +08:00
parent 8cfe9f2772
commit 9c35aa266c

View file

@ -526,7 +526,7 @@ impl<'a, T: Rle, A: RleTreeTrait<T>> InternalNode<'a, T, A> {
F: FnMut(&T, *mut LeafNode<'_, T, A>),
{
debug_assert!(self.is_root());
let mut zipper = SmallVec::with_capacity(12);
let mut zipper = SmallVec::new();
match self._delete(start, end, &mut zipper, 1, notify) {
Ok(_) => {
A::update_cache_internal(self);