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

Method into_pyresult

crates/vm/src/windows.rs:48–54  ·  view source on GitHub ↗
(self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

46 self.0.is_err()
47 }
48 pub fn into_pyresult(self, vm: &VirtualMachine) -> PyResult<T::Ok> {
49 if !self.is_err() {
50 Ok(self.0.into_ok())
51 } else {
52 Err(vm.new_last_os_error())
53 }
54 }
55}
56
57impl<T: WindowsSysResultValue> ToPyResult for WindowsSysResult<T> {

Callers 3

to_pyresultMethod · 0.80
CreateProcessFunction · 0.80
getattributelistFunction · 0.80

Calls 4

is_errMethod · 0.80
into_okMethod · 0.80
new_last_os_errorMethod · 0.80
ErrClass · 0.50

Tested by

no test coverage detected