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