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

Function _unregister_error

crates/vm/src/stdlib/_codecs.rs:116–123  ·  view source on GitHub ↗
(errors: PyUtf8StrRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

114
115 #[pyfunction]
116 fn _unregister_error(errors: PyUtf8StrRef, vm: &VirtualMachine) -> PyResult<bool> {
117 if errors.as_str().contains('\0') {
118 return Err(cstring_error(vm));
119 }
120 vm.state
121 .codec_registry
122 .unregister_error(errors.as_str(), vm)
123 }
124
125 type EncodeResult = PyResult<(Vec<u8>, usize)>;
126

Callers

nothing calls this directly

Calls 5

cstring_errorFunction · 0.85
unregister_errorMethod · 0.80
ErrClass · 0.50
containsMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected