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

Method flip_color

src/tree/binary/node.rs:201–205  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

199 }
200
201 pub fn flip_color(&mut self) {
202 if let Some(mut node) = self.node {
203 unsafe { node.as_mut().color = node.as_ref().color.flip() }
204 }
205 }
206
207 pub fn color(&self) -> Option<Color> {
208 unsafe { self.node.map(|node| node.as_ref().color) }

Callers 1

flip_colorsFunction · 0.80

Calls 1

flipMethod · 0.80

Tested by

no test coverage detected