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

Method print_node

code/chapter08/dfs.rs:44–51  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

42 }
43
44 fn print_node(&self) {
45 let mut curr = self.first.clone();
46 while let Some(val) = curr {
47 print!("[{}]", &val.borrow().data);
48 curr = val.borrow().next.clone();
49 }
50 print!("\n");
51 }
52
53 fn insert(&mut self, data: usize) {
54 let node = Rc::new(RefCell::new(Node::new(data)));

Callers 1

create_graphFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected