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

Method left_subtree

publication/code/chapter08/avl.rs:181–186  ·  view source on GitHub ↗

获取左右子树

(&mut self)

Source from the content-addressed store, hash-verified

179
180 // 获取左右子树
181 fn left_subtree(&mut self) -> &mut Self {
182 match self {
183 Null => panic!("Error: Empty tree!"),
184 Tree(node) => &mut node.left,
185 }
186 }
187
188 fn right_subtree(&mut self) -> &mut Self {
189 match self {

Callers 2

rotate_leftMethod · 0.45
rotate_rightMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected