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

Method set_right

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

Source from the content-addressed store, hash-verified

146 }
147
148 pub fn set_right(&mut self, node: Option<NonNull<Node<K, V>>>) {
149 unsafe {
150 if let Some(mut p) = self.node {
151 p.as_mut().right = node;
152 }
153
154 if let Some(mut p) = node {
155 p.as_mut().parent = self.node;
156 }
157 }
158 }
159
160 pub fn set_children(&mut self, l: Option<NonNull<Node<K, V>>>, r: Option<NonNull<Node<K, V>>>) {
161 self.set_left(l);

Callers 8

putFunction · 0.45
del_maxFunction · 0.45
deleteFunction · 0.45
rotate_leftFunction · 0.45
rotate_rightFunction · 0.45
move_red_leftFunction · 0.45
set_childrenMethod · 0.45
replaceMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected