diff --git a/vortex-serde/src/layouts/write/writer.rs b/vortex-serde/src/layouts/write/writer.rs index 686879ef60..43382ad9bb 100644 --- a/vortex-serde/src/layouts/write/writer.rs +++ b/vortex-serde/src/layouts/write/writer.rs @@ -105,7 +105,7 @@ impl LayoutWriter { Some(x) => x, }; - let mut byte_offsets = Vec::with_capacity(size_hint); + let mut byte_offsets = Vec::with_capacity(size_hint + 1); byte_offsets.push(self.msgs.tell()); while let Some(chunk) = stream.try_next().await? { metadata.push_chunk(&chunk)?;