Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QMHTMY/RustBook
/ is_adjacent
Method
is_adjacent
code/chapter08/graph_adjlist.rs:155–157 ·
view source on GitHub ↗
判断两个点是否相邻
(&self, from: &T, to: &T)
Source
from the content-addressed store, hash-verified
153
154
// 判断两个点是否相邻
155
fn is_adjacent(&self, from: &T, to: &T) -> bool {
156
self.vertices.get(from).unwrap().adjacent_key(to)
157
}
158
}
159
160
fn main() {
Callers
1
main
Function · 0.45
Calls
2
adjacent_key
Method · 0.45
get
Method · 0.45
Tested by
no test coverage detected