diff --git a/src/offset.rs b/src/offset.rs index 4ab062ef6d..aac7621584 100644 --- a/src/offset.rs +++ b/src/offset.rs @@ -377,12 +377,18 @@ impl OffsetsBuffer { &self.0 } - /// Returns the length of this container + /// Returns the length an array with these offsets would be. #[inline] - pub fn len(&self) -> usize { + pub fn len_proxy(&self) -> usize { self.0.len() - 1 } + #[inline] + /// Returns the number of offsets in this container. + pub fn len(&self) -> usize { + self.0.len() + } + /// Returns the byte slice stored in this buffer #[inline] pub fn as_slice(&self) -> &[O] {