I forgot to add the kicker for TwoPair. You have to add kickers for HighCard, Pair, TwoPair. On the other hand, StraightFlush doesn't need other_cards. So it should be more like:
I came here to understand the theory (and there is so much) behind Ord, PartialOrd, Eq and PartialEq. But I ended up getting a solution to my exercise. Not bad.
I love the HandValue approach mostly because how enum variants are ordered in Rust.
Im mostly exploring these concepts (also watching the PR by @jbe) and I have nothing more to add here. All comments were very insightful so I dont know which one to mark as the solution.
I'll just let this topic die a slow death. Unless someone thinks otherwise.
Wait...not sure why I was surprised by this. This is valid even for Java.
When I used enums, I never felt the need to compare invariants variants. The order of invariants variants matters only when you want enum instances to be ordered.
Going forward Im going to be cognizant of this fact. It'll save me some refactoring (and weird bugs) in case there is a future requirement to make my enum ordered.