Find the root representative key for a given composite key. Returns None if the key is not in the union-find. Like `is_equiv`, takes the lookup key by reference so callers can reuse a single `EqKey` binding across multiple queries without cloning it for each call.
(&mut self, key: &EqKey)
| 118 | let rb = self.find(b); |
| 119 | if ra == rb { |
| 120 | return false; |
| 121 | } |
| 122 | if self.rank[ra] < self.rank[rb] { |
| 123 | self.parent[ra] = rb; |
| 124 | } else if self.rank[ra] > self.rank[rb] { |
| 125 | self.parent[rb] = ra; |
| 126 | } else { |
| 127 | self.parent[rb] = ra; |