(errors: &PyRef<PyUtf8Str>, vm: &VirtualMachine)
| 2823 | } |
| 2824 | |
| 2825 | fn validate_errors(errors: &PyRef<PyUtf8Str>, vm: &VirtualMachine) -> PyResult<()> { |
| 2826 | if errors.as_str().contains('\0') { |
| 2827 | return Err(cstring_error(vm)); |
| 2828 | } |
| 2829 | vm.state |
| 2830 | .codec_registry |
| 2831 | .lookup_error(errors.as_str(), vm) |
| 2832 | .map(drop) |
| 2833 | } |
| 2834 | |
| 2835 | fn bool_from_index(value: PyObjectRef, vm: &VirtualMachine) -> PyResult<bool> { |
| 2836 | let int = value.try_index(vm)?; |
nothing calls this directly
no test coverage detected