Returns the offset into the underlying values array for the array slot at `index`. # Panics Panics if `index` is greater than or equal the length of the array.
(&self, index: usize)
| 279 | /// |
| 280 | /// Panics if `index` is greater than or equal the length of the array. |
| 281 | pub fn value_offset(&self, index: usize) -> usize { |
| 282 | assert!(index < self.len()); |
| 283 | match &self.offsets { |
| 284 | Some(offsets) => offsets[index] as usize, |
| 285 | None => self.offset() + index, |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | /// Returns the array's value at index `i`. |
| 290 | /// |
no test coverage detected