()
| 165 | } |
| 166 | |
| 167 | /// Record that two composite keys are definitionally equal. |
| 168 | /// |
| 169 | /// Kept by-value because `node_for_key` inserts the key into the |
| 170 | /// internal `key_to_node` map on first observation, requiring |
| 171 | /// ownership transfer. Callers that have already consumed their |
| 172 | /// `EqKey`s should clone at the call site, not here. |
| 173 | pub fn add_equiv(&mut self, k1: EqKey, k2: EqKey) { |
| 174 | let n1 = self.node_for_key(k1); |
| 175 | let n2 = self.node_for_key(k2); |
| 176 | self.union(n1, n2); |
| 177 | } |