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

Method get_next

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

Source from the content-addressed store, hash-verified

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 {
378 let inner = self.inner.get();
379 let prev = inner as *const Option<NonNull<T>>;
380 let next = prev.add(1);
381 ptr::read(next)
382 }
383 }
384
385 pub const fn set_prev(&mut self, value: Option<NonNull<T>>) {
386 // SAFETY: prev is the first field in PointersInner, which is #[repr(C)].

Callers 11

pop_frontMethod · 0.80
removeMethod · 0.80
iterMethod · 0.80
nextMethod · 0.80
fmtMethod · 0.80
unlink_weakrefFunction · 0.80
addMethod · 0.80
clearMethod · 0.80
countMethod · 0.80
get_weak_referencesMethod · 0.80

Calls 3

readFunction · 0.70
getMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected