Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QMHTMY/RustBook
/ iter_mut
Method
iter_mut
publication/code/chapter04/queue.rs:70–77 ·
view source on GitHub ↗
(&mut self)
Source
from the content-addressed store, hash-verified
68
}
69
70
fn iter_mut(&mut self) -> IterMut<T> {
71
let mut iterator = IterMut { stack: Vec::new() };
72
for item in self.data.iter_mut() {
73
iterator.stack.push(item);
74
}
75
76
iterator
77
}
78
}
79
80
// 实现三种迭代功能
Callers
1
iter
Function · 0.45
Calls
1
push
Method · 0.45
Tested by
no test coverage detected