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

Method get_left

code/chapter07/binary_tree.rs:50–52  ·  view source on GitHub ↗

获取左右子节点及根节点,注意使用了 clone

(&self)

Source from the content-addressed store, hash-verified

48
49 // 获取左右子节点及根节点,注意使用了 clone
50 fn get_left(&self) -> Link<T> {
51 self.left.clone()
52 }
53
54 fn get_right(&self) -> Link<T> {
55 self.right.clone()

Callers 5

preorderFunction · 0.45
inorderFunction · 0.45
postorderFunction · 0.45
get_expFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected