Try to decode a byte from a hex char. None will be returned if the input char is hex-invalid.
(c: u8)
| 331 | /// |
| 332 | /// None will be returned if the input char is hex-invalid. |
| 333 | const fn try_decode_hex_char(c: u8) -> Option<u8> { |
| 334 | match c { |
| 335 | b'A'..=b'F' => Some(c - b'A' + 10), |
| 336 | b'a'..=b'f' => Some(c - b'a' + 10), |
| 337 | b'0'..=b'9' => Some(c - b'0'), |
| 338 | _ => None, |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | /// Returns None if the value can't be converted to i256. |
| 343 | /// Modified from <https://github.com/apache/arrow-rs/blob/c4dbf0d8af6ca5a19b8b2ea777da3c276807fc5e/arrow-buffer/src/bigint/mod.rs#L303> |
no outgoing calls
no test coverage detected
searching dependent graphs…