Does the set contain `key`?.
(&self, key: K, forest: &SetForest<K>, comp: &C)
| 93 | |
| 94 | /// Does the set contain `key`?. |
| 95 | pub fn contains<C: Comparator<K>>(&self, key: K, forest: &SetForest<K>, comp: &C) -> bool { |
| 96 | self.root |
| 97 | .expand() |
| 98 | .and_then(|root| Path::default().find(key, root, &forest.nodes, comp)) |
| 99 | .is_some() |
| 100 | } |
| 101 | |
| 102 | /// Try to insert `key` into the set. |
| 103 | /// |