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

Method get_unchecked_ptr

crates/common/src/boxvec.rs:99–101  ·  view source on GitHub ↗

Get pointer to where element at `index` would be

(&mut self, index: usize)

Source from the content-addressed store, hash-verified

97
98 /// Get pointer to where element at `index` would be
99 unsafe fn get_unchecked_ptr(&mut self, index: usize) -> *mut T {
100 unsafe { self.xs.as_mut_ptr().add(index).cast() }
101 }
102
103 pub fn insert(&mut self, index: usize, element: T) {
104 self.try_insert(index, element).unwrap()

Callers 6

push_uncheckedMethod · 0.80
try_insertMethod · 0.80
popMethod · 0.80
nextMethod · 0.80
next_backMethod · 0.80
dropMethod · 0.80

Calls 3

as_mut_ptrMethod · 0.80
castMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected