Skip to content

v2.9.3

Latest

Choose a tag to compare

@elliotchance elliotchance released this 24 Nov 16:23
e49bf41
Diff handles duplicate values correctly (#206)

Diff only matched the first copy of each value, so when both slices
contained duplicates, the extra copies were reported as added or
removed. For example, [5, 5, 5] against [5, 5, 6] returned added [5, 6]
and removed [5, 5] instead of added [6] and removed [5].

Diff now counts how many copies of each value are left to match. The
order of the results still follows the input slices.

Fixes #202