()
| 146 | None => return false, |
| 147 | }; |
| 148 | let n2 = match self.key_to_node.get(k2) { |
| 149 | Some(&n) => n, |
| 150 | None => return false, |
| 151 | }; |
| 152 | self.find(n1) == self.find(n2) |
| 153 | } |
| 154 | |
| 155 | /// Find the root representative key for a given composite key. |
| 156 | /// Returns None if the key is not in the union-find. |
| 157 | /// |
| 158 | /// Like `is_equiv`, takes the lookup key by reference so callers can |