Code says more than 1000 words:
julia> my_node1 = XML.Element("wpt")
Node Element <wpt>
julia> my_node2 = XML.Element("wpt")
Node Element <wpt>
julia> my_node1 == my_node2
true
julia> unique([my_node1, my_node2]) # This returns two identical Nodes
2-element Vector{Node}:
Node Element <wpt>
Node Element <wpt>
julia> hash(my_node1), hash(my_node2) # It is caused by different hashes for identical objects
(0xb74eb41702f2670f, 0xcd3b89a9eea9e270)
This feels like a correctness-bug to me. Should we create a custom method for unique and unique! (or only the one that is the basis of the other I guess) that respects equality? If not, it becomes rather cumbersome to remove duplicates from vectors of nodes.
Code says more than 1000 words:
This feels like a correctness-bug to me. Should we create a custom method for unique and unique! (or only the one that is the basis of the other I guess) that respects equality? If not, it becomes rather cumbersome to remove duplicates from vectors of nodes.