Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It'd be nice if urn::Urn implemented PartialOrd, Ord #6

Open
chanced opened this issue Jun 1, 2023 · 2 comments
Open

It'd be nice if urn::Urn implemented PartialOrd, Ord #6

chanced opened this issue Jun 1, 2023 · 2 comments

Comments

@chanced
Copy link

chanced commented Jun 1, 2023

It'd be nice if urn::Urn implemented:

edit: ah, Urn already implements Deref.

@chanced 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, Ord Jun 1, 2023
@chayleaf
Copy link
Owner

chayleaf commented Jun 2, 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.

@chanced
Copy link
Author

chanced commented Jun 2, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants