pub fn update_matches(
(a, b): (Match, Match),
(where_is_match, matches_hash): (&mut MatchesLookup, &mut Matches),
)
Expand description
Add or remove entries from lookup and matches based on given pair of matches.
There are 4 situations that we prepare for.
- The pair of matches both exist in the same bucket. We don’t need to do anything.
- The pair of matches both exist in different buckets. We combine both buckets.
- One of the pair of matches exist in a bucket. We put the other one in that bucket.
- None of the matches exist in any bucket. We put one of them in a bucket labelled with the other.