(&self, rng: &mut R)
| 133 | } |
| 134 | |
| 135 | pub(crate) fn select_random<R: Rng>(&self, rng: &mut R) -> CmpCursor { |
| 136 | let total = self.len(); |
| 137 | if total == 0 { |
| 138 | return CmpCursor { array: 0, offset: 0 }; |
| 139 | } |
| 140 | self.cursor_from_offset(rng.gen_range(0..total)) |
| 141 | } |
| 142 | |
| 143 | fn cursor_from_offset(&self, mut offset: usize) -> CmpCursor { |
| 144 | let mut array = 0; |
no test coverage detected