You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In geoarrow-rs/rust/geoarrow/src/array/mixed/array.rs, the comment indicate the code panics if offset + length >= self.len() while the code will panic if offset + length < self.len()
/// # Panic////// This function panics iff `offset + length >= self.len()`.#[inline]pubfn slice(&self,offset:usize,length:usize) -> Self{assert!(
offset + length <= self.len(),
"offset + length may not exceed length of array");
In geoarrow-rs/rust/geoarrow/src/array/util.rs, the comment indicate the code panics if index >= self.len() while the code will panic if index >= self.len() -1
impl<O:OffsetSizeTrait>OffsetBufferUtils<O>forOffsetBuffer<O>{/// Returns the length an array with these offsets would be.#[inline]fnlen_proxy(&self) -> usize{self.len() - 1}/// Returns a range (start, end) corresponding to the position `index`////// # Panic////// Panics iff `index >= self.len()`#[inline]fnstart_end(&self,index:usize) -> (usize,usize){assert!(index < self.len_proxy());let start = self[index].to_usize().unwrap();let end = self[index + 1].to_usize().unwrap();(start, end)}
The text was updated successfully, but these errors were encountered:
In geoarrow-rs/rust/geoarrow/src/array/mixed/array.rs, the comment indicate the code panics if offset + length >= self.len() while the code will panic if offset + length < self.len()
In geoarrow-rs/rust/geoarrow/src/array/util.rs, the comment indicate the code panics if index >= self.len() while the code will panic if index >= self.len() -1
The text was updated successfully, but these errors were encountered: