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

Method borrow_buf_mut

crates/vm/src/builtins/bytearray.rs:92–94  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

90 }
91
92 pub fn borrow_buf_mut(&self) -> PyMappedRwLockWriteGuard<'_, Vec<u8>> {
93 PyRwLockWriteGuard::map(self.inner.write(), |inner| &mut inner.elements)
94 }
95
96 fn repeat(&self, value: isize, vm: &VirtualMachine) -> PyResult<Self> {
97 self.inner().mul(value, vm).map(|x| x.into())

Callers 4

_setitem_by_indexMethod · 0.45
_setitemMethod · 0.45
reverseMethod · 0.45
bytearray.rsFile · 0.45

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected