MCPcopy Index your code
hub / github.com/RustPython/RustPython / uu_a2b_read

Function uu_a2b_read

crates/stdlib/src/binascii.rs:392–404  ·  view source on GitHub ↗
(c: &u8, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

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 {

Callers 1

a2b_uuFunction · 0.85

Calls 4

new_binascii_errorFunction · 0.85
ErrClass · 0.50
containsMethod · 0.45
to_ownedMethod · 0.45

Tested by

no test coverage detected