Skip to content

Hashmap key order shouldn't matter #47

Closed
@pesterhazy

Description

@pesterhazy

It shouldn't matter in which order I add keys to a hashmap:

(ddiff/diff {:name "Alyysa P Hacker" :age 40} {:age 40 :name "Alyssa P Hacker"})

Expected

{:name #lambdaisland.deep_diff2.diff_impl.Mismatch{:- "Alyysa P Hacker", :+ "Alyssa P Hacker"}, :age 40}

Actual

The :age key is removed and re-added:

{#lambdaisland.deep_diff2.diff_impl.Insertion{:+ :age} 40, :name #lambdaisland.deep_diff2.diff_impl.Mismatch{:- "Alyysa P Hacker", :+ "Alyssa P Hacker"}, #lambdaisland.deep_diff2.diff_impl.Deletion{:- :age} 40}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions