*: young clippy back at it again

This commit is contained in:
2026-04-02 02:25:48 +01:00
parent 91b40ed412
commit 69c012e47a
3 changed files with 5 additions and 6 deletions

View File

@@ -78,11 +78,11 @@ impl Card {
}
pub fn rank(&self) -> Option<Rank> {
self.playing_card().and_then(|pc| Some(pc.rank))
self.playing_card().map(|pc| pc.rank)
}
pub fn suit(&self) -> Option<Suit> {
self.playing_card().and_then(|pc| Some(pc.suit))
self.playing_card().map(|pc| pc.suit)
}
}
@@ -226,7 +226,7 @@ mod traits_numerics {
impl From<PlayingCard> for i64 {
fn from(card: PlayingCard) -> i64 {
let deck = card.deck as i64;
let deck = card.deck;
let rank = card.rank as i64;
let suit = card.suit as i64;
(deck * 52) + (rank * 4) + suit