MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / add_neighbor

Method add_neighbor

code/chapter08/word_ladder.rs:70–72  ·  view source on GitHub ↗
(&mut self, nbr: T, wt: u32)

Source from the content-addressed store, hash-verified

68 }
69
70 fn add_neighbor(&mut self, nbr: T, wt: u32) {
71 self.neighbors.push((nbr, wt));
72 }
73
74 // 获取邻点
75 fn get_neighbors(&self) -> Vec<&T> {

Callers 1

add_edgeMethod · 0.45

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected