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

Method contiguous_mut_unchecked

crates/vm/src/protocol/buffer.rs:83–85  ·  view source on GitHub ↗

# Safety assume the buffer is contiguous and writable

(&self)

Source from the content-addressed store, hash-verified

81 /// # Safety
82 /// assume the buffer is contiguous and writable
83 pub unsafe fn contiguous_mut_unchecked(&self) -> BorrowedValueMut<'_, [u8]> {
84 self.obj_bytes_mut()
85 }
86
87 pub fn append_to(&self, buf: &mut Vec<u8>) {
88 if let Some(bytes) = self.as_contiguous() {

Callers 2

borrow_buf_mutMethod · 0.80
as_contiguous_mutMethod · 0.80

Calls 1

obj_bytes_mutMethod · 0.45

Tested by

no test coverage detected