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

Method get_prev

crates/common/src/linked_list.rs:367–374  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

365 }
366
367 pub const fn get_prev(&self) -> Option<NonNull<T>> {
368 // SAFETY: prev is the first field in PointersInner, which is #[repr(C)].
369 unsafe {
370 let inner = self.inner.get();
371 let prev = inner as *const Option<NonNull<T>>;
372 ptr::read(prev)
373 }
374 }
375 pub const fn get_next(&self) -> Option<NonNull<T>> {
376 // SAFETY: next is the second field in PointersInner, which is #[repr(C)].
377 unsafe {

Callers 3

removeMethod · 0.80
fmtMethod · 0.80
unlink_weakrefFunction · 0.80

Calls 2

readFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected