From 987d8bd0f4bab943d331e0de86a2c3f6dcca7066 Mon Sep 17 00:00:00 2001 From: Rhys Lloyd Date: Mon, 8 Jun 2026 21:17:41 -0700 Subject: [PATCH] Revert "feat(card_game): add Suit::is_black and Rank::value convenience methods" This reverts commit 2eaa99e82dc40ab59ca0033717667fe7f66452d3. These functions are not necessary. Remove their usages which are only used in tests and frankenstein code. --- card_game/src/lib.rs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/card_game/src/lib.rs b/card_game/src/lib.rs index ea77918..fcf94fa 100644 --- a/card_game/src/lib.rs +++ b/card_game/src/lib.rs @@ -72,10 +72,6 @@ impl Suit { pub const fn is_red(self) -> bool { self as u8 & 0b01 != 0 } - /// Is the suit black. - pub const fn is_black(self) -> bool { - !self.is_red() - } /// Suit value is 2 bits, is_red is the low bit. pub const fn suit_high_bit(self) -> bool { self as u8 & 0b10 != 0 @@ -134,10 +130,6 @@ impl Rank { _ => return None, }) } - /// Numeric value: Ace = 1, King = 13. - pub const fn value(self) -> u8 { - self as u8 - } pub const fn checked_add(self, offset: u8) -> Option { match (self as u8).checked_add(offset) { Some(rank) => Self::new(rank),