(s: &str)
| 71 | } |
| 72 | |
| 73 | pub fn decode_hex(s: &str) -> Result<Vec<u8>, core::num::ParseIntError> { |
| 74 | (0..s.len()) |
| 75 | .step_by(2) |
| 76 | .map(|i| u8::from_str_radix(&s[i..i + 2], 16)) |
| 77 | .collect() |
| 78 | } |
| 79 | |
| 80 | fn main() -> Result<(), Error> { |
| 81 | Ok(match Args::parse().cmd { |