Visit ranges in unspecified order, paired with the index each range occurs at.
(
&self,
)
| 59 | /// Visit ranges in unspecified order, paired with the index each |
| 60 | /// range occurs at. |
| 61 | pub fn iter( |
| 62 | &self, |
| 63 | ) -> impl DoubleEndedIterator<Item = (usize, Range<usize>)> + ExactSizeIterator + '_ { |
| 64 | self.ranges |
| 65 | .array_windows() |
| 66 | .enumerate() |
| 67 | .map(|(index, [lo, hi])| (self.map_index(index), *lo as usize..*hi as usize)) |
| 68 | } |
| 69 | |
| 70 | /// Reverse this list of ranges, so that the first range is at the |
| 71 | /// last index and the last range is at the first index. |
no test coverage detected