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

Method left_subtree

code/chapter07/avl.rs:168–173  ·  view source on GitHub ↗

获取左右子树

(&mut self)

Source from the content-addressed store, hash-verified

166
167 // 获取左右子树
168 fn left_subtree(&mut self) -> &mut Self {
169 match *self {
170 Null => panic!("Empty tree"),
171 Tree(ref mut node) => &mut node.left,
172 }
173 }
174
175 fn right_subtree(&mut self) -> &mut Self {
176 match *self {

Callers 2

rotate_leftMethod · 0.45
rotate_rightMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected