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

Function inorder

code/chapter07/binary_tree.rs:96–102  ·  view source on GitHub ↗
(bt: Link<T>)

Source from the content-addressed store, hash-verified

94}
95
96fn inorder<T: Clone + Debug>(bt: Link<T>) {
97 if !bt.is_none() {
98 inorder(bt.as_ref().unwrap().get_left());
99 println!("key is {:?}", bt.as_ref().unwrap().get_key());
100 inorder(bt.as_ref().unwrap().get_right());
101 }
102}
103
104fn postorder<T: Clone + Debug>(bt: Link<T>) {
105 if !bt.is_none() {

Callers 1

mainFunction · 0.70

Calls 2

get_leftMethod · 0.45
get_rightMethod · 0.45

Tested by

no test coverage detected