keys with non changing value ends in the added and removed maps
Closed this issue · 2 comments
theharq commented
according to the Readme:
Keys whose values remained equal are thus not listed in these maps
But when I run:
MapDiff.diff(%{a: 1, b: 2, c: 9}, %{a: 3, b: 4, c: 9})
the value for the key c
is the same (9)
but it is included in the added
and removed
maps.
%{added: %{a: 3, b: 4, c: 9}, changed: :map_change,
removed: %{a: 1, b: 2, c: 9},
value: %{a: %{added: 3, changed: :primitive_change, removed: 1},
b: %{added: 4, changed: :primitive_change, removed: 2},
c: %{changed: :equal, value: 9}}}
Is this an issue or I'm missing something?
Thank you for your work in this library!
wcpines commented
+1
Qqwy commented
Thank you for bringing this to my attention, and my sincere apologies for my slow reply. (The GitHub notifications were not set up properly, I think).
You're right; this behaviour is incorrect. (the behaviour listed in the README is the intended behaviour). I'll take a closer look once I have time (which, because of the Global Game Jam will be Tuesday at the earliest, unfortunately).