Locate the position of a tile with `tile_id` in the reader's footer.
(reader: &SegmentReader<'_>, tile_id: TileId)
| 317 | |
| 318 | /// Locate the position of a tile with `tile_id` in the reader's footer. |
| 319 | fn find_tile_index(reader: &SegmentReader<'_>, tile_id: TileId) -> ArrayResult<usize> { |
| 320 | reader |
| 321 | .tiles() |
| 322 | .iter() |
| 323 | .position(|e| e.tile_id == tile_id) |
| 324 | .ok_or_else(|| ArrayError::SegmentCorruption { |
| 325 | detail: format!("find_tile_index: TileId {tile_id:?} not found in segment"), |
| 326 | }) |
| 327 | } |
| 328 | |
| 329 | // ── Tests ──────────────────────────────────────────────────────────────────── |
| 330 |
no test coverage detected