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

Method iter

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

Source from the content-addressed store, hash-verified

284 // === rustpython additions ===
285
286 pub fn iter(&self) -> impl Iterator<Item = &L::Target> {
287 core::iter::successors(self.head, |node| unsafe {
288 L::pointers(*node).as_ref().get_next()
289 })
290 .map(|ptr| unsafe { ptr.as_ref() })
291 }
292}
293
294impl<L: Link> fmt::Debug for LinkedList<L, L::Target> {

Callers

nothing calls this directly

Calls 3

get_nextMethod · 0.80
mapMethod · 0.45
as_refMethod · 0.45

Tested by

no test coverage detected