Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions types/src/card_play.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,7 @@ impl Ord for CardPlay {
if std::mem::discriminant(self) != std::mem::discriminant(other) {
panic!("Cannot compare CardPlay variants of different types");
}
let our_card = match self {
CardPlay::Single(card) => card,
CardPlay::Pair(card, _) => card,
CardPlay::Triple(card, _, _) => card,
CardPlay::Quad(card, _, _, _) => card,
};
let their_card = match other {
CardPlay::Single(card) => card,
CardPlay::Pair(card, _) => card,
CardPlay::Triple(card, _, _) => card,
CardPlay::Quad(card, _, _, _) => card,
};
our_card.cmp(their_card)
self.value().cmp(&other.value())
}
}

Expand Down