Absorbs the elements of the smaller [`NameSet`] into the bigger one and returns the merged set.
(mut a: NameSet, mut b: NameSet)
| 17 | /// Absorbs the elements of the smaller [`NameSet`] into the bigger one and returns |
| 18 | /// the merged set. |
| 19 | pub fn merge_name_sets(mut a: NameSet, mut b: NameSet) -> NameSet { |
| 20 | if a.len() < b.len() { |
| 21 | b.extend(a); |
| 22 | b |
| 23 | } else { |
| 24 | a.extend(b); |
| 25 | a |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | /// Maps each [`Name`] to the set of [`Name`]s it is associated with. |
| 30 | pub type RefMap = FxHashMap<Name, NameSet>; |
no test coverage detected