(&mut self)
| 290 | |
| 291 | impl Decoder<'_> { |
| 292 | fn flag(&mut self) -> Result<bool> { |
| 293 | let flag = get(&mut self.control)?; |
| 294 | ensure!(flag <= 1, "invalid optional flag"); |
| 295 | Ok(flag == 1) |
| 296 | } |
| 297 | |
| 298 | fn count(&mut self) -> Result<usize> { |
| 299 | let n = usize::try_from(get(&mut self.control)?)?; |
no test coverage detected