Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QMHTMY/RustBook
/ add_neighbor
Method
add_neighbor
code/chapter08/kinght_tour.rs:34–36 ·
view source on GitHub ↗
(&mut self, nbr: T)
Source
from the content-addressed store, hash-verified
32
}
33
34
fn add_neighbor(&mut self, nbr: T) {
35
self.neighbors.push(nbr);
36
}
37
38
fn get_neighbors(&self) -> Vec<&T> {
39
let mut neighbors = Vec::new();
Callers
1
add_edge
Method · 0.45
Calls
1
push
Method · 0.45
Tested by
no test coverage detected