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

make the Ordering type a bit more flexible #5766

Closed
wants to merge 2 commits into from
Closed

make the Ordering type a bit more flexible #5766

wants to merge 2 commits into from

Conversation

thestinger
Copy link
Contributor

It was simpler to just give the variants a value instead of listing out all the cases for (*self, *other) in a match statement or writing spaghetti code. This makes the cmp method easier to use with FFI too, since you're a cast away from an idiomatic C comparator function. It would be fine implemented another way though.

bors added a commit that referenced this pull request Apr 9, 2013
It was simpler to just give the variants a value instead of listing out all the cases for (*self, *other) in a match statement or writing spaghetti code. This makes the `cmp` method easier to use with FFI too, since you're a cast away from an idiomatic C comparator function. It would be fine implemented another way though.
@bors bors closed this Apr 10, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 26, 2020
…r=flip1995

Redundant pattern bugfix

changelog: Fixes the bug reported rust-lang#5766
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

Successfully merging this pull request may close these issues.

2 participants