(bytes: &[u8])
| 167 | } |
| 168 | |
| 169 | pub(crate) fn parse_digits(bytes: &[u8]) -> Option<u32> { |
| 170 | let mut value = 0; |
| 171 | for byte in bytes { |
| 172 | if !byte.is_ascii_digit() { |
| 173 | return None; |
| 174 | } |
| 175 | value = value * 10 + u32::from(byte - b'0'); |
| 176 | } |
| 177 | Some(value) |
| 178 | } |
| 179 | |
| 180 | pub(crate) fn days_in_month(year: i32, month: u32) -> u32 { |
| 181 | match month { |
no outgoing calls
no test coverage detected