-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
No definition of lexicographic order in docs for Iterator::cmp*
#72255
Comments
Quoting the docs for the C++ standard library (emphasis mine):
|
Iterator::cmp*
To resolve this, you can either write a definition of lexicographical order somewhere in the rust documentation or link to an easily understandable source. Then link to that definition wherever "lexicographical" appears in the source. FWIW, I don't think the wikipedia article qualifies as "easily understandable". |
Hi I would like to take this on as a first issue if that's okay. |
Triage: Hi, are you still working on this issue @softwaredeveloptam? |
Hey there, @Alexendoo I got pretty busy and it slipped my mind, but will give it a shot this week! |
I am working on this. |
It seems that the comparison functions are not correctly implemented.
I tried this code:
I expected to see this happen:
The code above should panic. The reason is: 1 is NOT less than 1 and 1 is NOT greater than 1.
What I'm missing in Ordering are LessOrEqual and GreaterOrEqual. If these 2 objects would exist I could write:
which would correct not panic.
Meta
I've tried this in Rust Playground with stable and nightly.
The text was updated successfully, but these errors were encountered: