Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Reserve child arrays, not their container
Browse files Browse the repository at this point in the history
  • Loading branch information
hohav committed Aug 5, 2022
1 parent f7af903 commit c27ce7e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/array/struct_/mutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ impl MutableStructArray {
impl MutableStructArray {
/// Reserves `additional` entries.
pub fn reserve(&mut self, additional: usize) {
self.values.reserve(additional);
for v in &mut self.values {
v.reserve(additional);
}
if let Some(x) = self.validity.as_mut() {
x.reserve(additional)
}
Expand Down

0 comments on commit c27ce7e

Please sign in to comment.