Skip to content

Commit c79a228

Browse files
committed
fix(buffer): preserve logical capacity when realigning
Signed-off-by: Nicholas Gates <[email protected]>
1 parent 78c996e commit c79a228

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎vortex-buffer/src/buffer_mut.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,7 @@ impl<T> BufferMut<T> {
730730
let allocator = self.allocation.allocator().clone();
731731
let mut aligned = Self::with_capacity_aligned_in(capacity, alignment, allocator);
732732
aligned.extend_from_slice(&self);
733+
aligned.capacity = capacity;
733734
aligned
734735
}
735736
}

0 commit comments

Comments
 (0)