<commit_before>pub mod dto;
mod suit;
mod rank;

pub use card::suit::Suit;
pub use card::suit::OptionSuit;
pub use card::rank::Rank;
pub use card::rank::OptionRank;

#[derive(Debug, PartialEq, PartialOrd, Eq, Ord, Clone, Copy)]
pub struct Card {
    pub suit: Suit,
    pub rank: Rank
}

impl Card {
    pub fn new(suit: Suit, rank: Rank) -> Card {
        Card { suit: suit, rank: rank }
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn reversible_suit() {
        let num: u32 = Suit::Heart.into();
        assert_eq!(Some(Suit::Heart), *OptionSuit::from(num));
    }

    #[test]
    fn reversible_rank() {
        let num: u32 = Rank::Ace.into();
        assert_eq!(Some(Rank::Ace), *OptionRank::from(num));
    }

    #[test]
    fn invalid_rank() {
        assert_eq!(None, *OptionRank::from(1));
    }

}<commit_msg>cleanup<commit_after>pub mod dto;
mod suit;
mod rank;

pub use card::suit::Suit;
pub use card::suit::OptionSuit;
pub use card::rank::Rank;
pub use card::rank::OptionRank;

#[derive(Debug, PartialEq, PartialOrd, Eq, Ord, Clone, Copy)]
pub struct Card {
    pub suit: Suit,
    pub rank: Rank
}

impl Card {
    pub fn new(suit: Suit, rank: Rank) -> Card {
        Card { suit: suit, rank: rank }
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn reversible_suit() {
        assert_eq!(Some(Suit::Heart), *OptionSuit::from(u32::from(Suit::Heart)));
    }

    #[test]
    fn reversible_rank() {
        assert_eq!(Some(Rank::Ace), *OptionRank::from(u32::from(Rank::Ace)));
    }

    #[test]
    fn invalid_rank() {
        assert_eq!(None, *OptionRank::from(1));
    }

}
{'fraction_non_alphanumeric': 0.17338217338217338, 'fraction_numerical': 0.006105006105006105, 'mean_word_length': 3.1704834605597965, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5955362', 'n_tokens_mistral': 609, 'n_tokens_neox': 596, 'n_words': 146}