You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
chanced
changed the title
It'd be nice if urn::Urn implemented Deref<Target=str>, PartialOrd, Ord
It'd be nice if urn::Urn implemented PartialOrd, OrdJun 1, 2023
The URN specification doesn't define ordering, and you can already use a HashMap. Is this use case particularly important for you? I think it wouldn't hurt to implement this (same caveats as Eq apply - r/q/f-components will be discarded for ordering), but the question is whether this should be done in the next planned release (see the roadmap in README), or sooner.
Oh, it can definitely wait. It is definitely a nice-to-have and not a need. Using a HashMap over a BTreeMap was something I had already done before posting. I merely brought it up because i figured it's a low-hanging fruit that could slightly improve the usability of the crate.
I created the issue mostly about Deref because I initially missed that it already implements it.
Anyway, thank you for your work! It is much appreciated.
It'd be nice if
urn::Urn
implemented:Deref<Target = str>
PartialOrd
Ord
so that it can be used as keys in aBTreeMap
edit: ah,
Urn
already implementsDeref
.The text was updated successfully, but these errors were encountered: