mitsuhiko / similar

A high level diffing library for rust based on diffs
https://insta.rs/similar
Apache License 2.0
949 stars 31 forks source link

What does the `Ord` bound requirement do in the capture_diff* functions? #50

Closed hillin closed 1 year ago

hillin commented 1 year ago

It seems they are not used anywhere (or did I just let them slip under my eyes?)

mitsuhiko commented 1 year ago

Ord and Hash are on all diff functions so that the diff algorithms can stash these elements into containers. Today only Hash is used but it would be a breaking change to make the bounds tighter in the future.