MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / iter

Method iter

publication/code/chapter04/queue.rs:61–68  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

59 }
60
61 fn iter(&self) -> Iter<T> {
62 let mut iterator = Iter { stack: Vec::new() };
63 for item in self.data.iter() {
64 iterator.stack.push(item);
65 }
66
67 iterator
68 }
69
70 fn iter_mut(&mut self) -> IterMut<T> {
71 let mut iterator = IterMut { stack: Vec::new() };

Callers 1

iterFunction · 0.45

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected