From a24d85572ddd09338282722108d93c5cf65828b5 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Thu, 2 Apr 2026 06:12:35 +0100 Subject: [PATCH] modes:single|pair: make fields of Single and Pair public So strange that this isn't default for tuple-like constructors. I can kinda get it for record-like constructors, but not for this. Better safe than sorry I guess? --- src/modes/pair.rs | 2 +- src/modes/single.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modes/pair.rs b/src/modes/pair.rs index c1632e3..792b67a 100644 --- a/src/modes/pair.rs +++ b/src/modes/pair.rs @@ -2,7 +2,7 @@ use crate::card::{Card, PlayingCard}; use crate::helper::ordered; #[derive(Eq, Debug, Copy, Clone)] -pub struct Pair(Card, Card); +pub struct Pair(pub Card, pub Card); impl Pair { /** Create a new pair utilising two cards, `c1` and `c2`. Will return None diff --git a/src/modes/single.rs b/src/modes/single.rs index c60bfe8..4a787b6 100644 --- a/src/modes/single.rs +++ b/src/modes/single.rs @@ -1,7 +1,7 @@ use crate::card::Card; #[derive(PartialEq, Eq, PartialOrd, Ord, Debug, Copy, Clone)] -pub struct Single(Card); +pub struct Single(pub Card); impl Single { /** Create a new single from a card `c`. Will return None if a Single