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

Method postorder

code/chapter07/bst.rs:74–84  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

72 }
73
74 fn postorder(&self) {
75 match &self.left {
76 Some(node) => node.postorder(),
77 None => (),
78 }
79 match &self.right {
80 Some(node) => node.postorder(),
81 None => (),
82 }
83 println!("key:{:?}, value:{:?}", &self.key, &self.val);
84 }
85
86 fn insert(&mut self, key: T, val: U) {
87 // 没数据直接插入

Callers 1

mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected