(&self, length: usize)
| 136 | /// Safety: `length` must be the `length` passed to populate. |
| 137 | #[cfg_attr(not(feature = "arrayvec"), allow(unused))] |
| 138 | pub unsafe fn any_greater_than<const N: usize>(&self, length: usize) -> bool { |
| 139 | if N < 255 { |
| 140 | // Fast path: don't need to scan large lengths since there shouldn't be any. |
| 141 | // A large length will have a 255 in small which will be greater than N. |
| 142 | self.small |
| 143 | .as_slice(length) |
| 144 | .iter() |
| 145 | .copied() |
| 146 | .max() |
| 147 | .unwrap_or(0) as usize |
| 148 | > N |
| 149 | } else { |
| 150 | let mut decoder = self.borrowed_clone(); |
| 151 | (0..length).any(|_| decoder.decode() > N) |
| 152 | } |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | impl<'a> View<'a> for LengthDecoder<'a> { |
nothing calls this directly
no test coverage detected