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

Method _as_contiguous_mut

crates/vm/src/builtins/memory.rs:414–420  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

412 }
413
414 fn _as_contiguous_mut(&self) -> Option<BorrowedValueMut<'_, [u8]>> {
415 self.desc.is_contiguous().then(|| {
416 BorrowedValueMut::map(self.buffer.obj_bytes_mut(), |x| {
417 &mut x[self.start..self.start + self.desc.len]
418 })
419 })
420 }
421
422 fn append_to(&self, buf: &mut Vec<u8>) {
423 if let Some(bytes) = self.as_contiguous() {

Callers

nothing calls this directly

Calls 3

is_contiguousMethod · 0.80
thenMethod · 0.45
obj_bytes_mutMethod · 0.45

Tested by

no test coverage detected