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
Implement Ord/PartialOrd? #114
Comments
I don’t think it makes sense to consider an URL intrinsically "greater" or "lesser" than another. But what’s the use case? |
The need for this is derived from Cargo, which primarily uses it for deterministic output in a few locations. There are spots where we sort an array of I personally view core traits like this as being useful to define on core types like |
Ok, that sounds like a real use case and I don’t have better way to solve it. I still don’t think any ordering is meaningful for URLs, but adding a few I don’t get your second point, though. What qualifies as a core trait? Should |
Ah I just mean "core" in the sense that it's often a building block for many other types. For example there are probably going to be a lot of structs which store a |
As for whether Ordering makes sense for Url: it seems natural that it would On Mon, Jun 1, 2015, 11:08 AM Alex Crichton notifications@github.com
|
Ordering URLs by the string ordering of their serialization seems reasonable, but it’s not the same ordering as what |
I notice that currently these traits aren't implemented for
Url
, and I was curious if this was done on purpose? If not, would it be possible to add them?The text was updated successfully, but these errors were encountered: