Why does Uuid implement Ord, PartialOrd?
timvisee opened this issue · comments
Tim Visée commented
The Uuid
type derives Ord
and PartialOrd
.
What is the reasoning behind implementing these? Aren't comparisons meaningless here, since we're essentially comparing random data?
I believe these are incorrect, and if so, they should be removed.
Ashley Mannix commented
@timvisee For v4 UUIDs it doesn’t make a lot of sense, but v6 and v7 UUIDs are laid out to be byte-wise sortable. For these variants the ordering does make sense.