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

Method inorder

publication/code/chapter08/bst.rs:272–282  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

270 }
271
272 fn inorder(&self) {
273 match &self.left {
274 Some(node) => node.inorder(),
275 None => (),
276 }
277 println!("key: {:?}, val: {:?}", self.key.unwrap(), self.val.unwrap());
278 match &self.right {
279 Some(node) => node.inorder(),
280 None => (),
281 }
282 }
283
284 fn postorder(&self) {
285 match &self.left {

Callers 1

orderFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected