Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QMHTMY/RustBook
/ remove_multi
Method
remove_multi
publication/code/chapter10/conshash.rs:69–75 ·
view source on GitHub ↗
批量删除结点
(&mut self, nodes: &[T])
Source
from the content-addressed store, hash-verified
67
68
// 批量删除结点
69
fn remove_multi(&mut self, nodes: &[T]) {
70
if !nodes.is_empty() {
71
for node in nodes.iter() {
72
self.remove(node);
73
}
74
}
75
}
76
77
// 删除一个结点
78
fn remove(&mut self, node: &T) {
Callers
nothing calls this directly
Calls
3
is_empty
Method · 0.45
iter
Method · 0.45
remove
Method · 0.45
Tested by
no test coverage detected