(c: &u8, vm: &VirtualMachine)
| 390 | |
| 391 | #[inline] |
| 392 | fn uu_a2b_read(c: &u8, vm: &VirtualMachine) -> PyResult<u8> { |
| 393 | // Check the character for legality |
| 394 | // The 64 instead of the expected 63 is because |
| 395 | // there are a few uuencodes out there that use |
| 396 | // '`' as zero instead of space. |
| 397 | if !(b' '..=(b' ' + 64)).contains(c) { |
| 398 | if [b'\r', b'\n'].contains(c) { |
| 399 | return Ok(0); |
| 400 | } |
| 401 | return Err(super::new_binascii_error("Illegal char".to_owned(), vm)); |
| 402 | } |
| 403 | Ok((*c - b' ') & 0x3f) |
| 404 | } |
| 405 | |
| 406 | #[derive(FromArgs)] |
| 407 | struct A2bQpArgs { |
no test coverage detected