(digits: &[u8])
| 30 | /// Parse nanoseconds from the first `N` values in digits, subtracting the offset `O` |
| 31 | #[inline] |
| 32 | fn parse_nanos<const N: usize, const O: u8>(digits: &[u8]) -> u32 { |
| 33 | digits[..N] |
| 34 | .iter() |
| 35 | .fold(0_u32, |acc, v| acc * 10 + v.wrapping_sub(O) as u32) |
| 36 | * 10_u32.pow((9 - N) as _) |
| 37 | } |
| 38 | |
| 39 | /// Helper for parsing RFC3339 timestamps |
| 40 | struct TimestampParser { |
nothing calls this directly
no test coverage detected