Skip to content

Instantly share code, notes, and snippets.

@kunigami
Last active April 12, 2019 05:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunigami/851609046b588ef19e2306061edc4d08 to your computer and use it in GitHub Desktop.
Save kunigami/851609046b588ef19e2306061edc4d08 to your computer and use it in GitHub Desktop.
struct NodePtr<K: Ord, V>(*mut RBTreeNode<K, V>);
...
pub struct RBTree<K: Ord, V> {
root: NodePtr<K, V>,
...
}
...
// in find_node_with_visitor()
let mut temp = &self.root;
let key = &(*temp.0).key;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment