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

Method __setstate__

crates/vm/src/builtins/bytearray.rs:888–892  ·  view source on GitHub ↗
(&self, state: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

886
887 #[pymethod]
888 fn __setstate__(&self, state: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {
889 self.internal
890 .lock()
891 .set_state(state, |obj, pos| pos.min(obj.__len__()), vm)
892 }
893}
894
895impl SelfIter for PyByteArrayIterator {}

Callers

nothing calls this directly

Calls 4

set_stateMethod · 0.80
lockMethod · 0.45
minMethod · 0.45
__len__Method · 0.45

Tested by

no test coverage detected