MCPcopy Create free account
hub / github.com/douchuan/algorithm / set_left

Method set_left

src/tree/binary/node.rs:136–146  ·  view source on GitHub ↗
(&mut self, node: Option<NonNull<Node<K, V>>>)

Source from the content-addressed store, hash-verified

134 }
135
136 pub fn set_left(&mut self, node: Option<NonNull<Node<K, V>>>) {
137 unsafe {
138 if let Some(mut p) = self.node {
139 p.as_mut().left = node;
140 }
141
142 if let Some(mut p) = node {
143 p.as_mut().parent = self.node;
144 }
145 }
146 }
147
148 pub fn set_right(&mut self, node: Option<NonNull<Node<K, V>>>) {
149 unsafe {

Callers 7

putFunction · 0.45
del_minFunction · 0.45
deleteFunction · 0.45
rotate_leftFunction · 0.45
rotate_rightFunction · 0.45
set_childrenMethod · 0.45
replaceMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected