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

Method set_next

crates/common/src/linked_list.rs:393–401  ·  view source on GitHub ↗
(&mut self, value: Option<NonNull<T>>)

Source from the content-addressed store, hash-verified

391 }
392 }
393 pub const fn set_next(&mut self, value: Option<NonNull<T>>) {
394 // SAFETY: next is the second field in PointersInner, which is #[repr(C)].
395 unsafe {
396 let inner = self.inner.get();
397 let prev = inner as *mut Option<NonNull<T>>;
398 let next = prev.add(1);
399 ptr::write(next, value);
400 }
401 }
402}
403
404impl<T> fmt::Debug for Pointers<T> {

Callers 7

push_frontMethod · 0.45
pop_frontMethod · 0.45
removeMethod · 0.45
unlink_weakrefFunction · 0.45
addMethod · 0.45
clearMethod · 0.45

Calls 3

writeFunction · 0.70
getMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected