Create the Rust Assignment Six project, everything works up to Player.

This commit is contained in:
Charles Descamps 2024-11-21 11:08:15 -07:00
parent d2d751306e
commit 72c3d634b3
209 changed files with 774 additions and 0 deletions

140
assignmentSix/Cargo.lock generated Normal file
View file

@ -0,0 +1,140 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "assignment_six"
version = "0.1.0"
dependencies = [
"rand",
]
[[package]]
name = "byteorder"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "getrandom"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
"libc",
"wasi",
]
[[package]]
name = "libc"
version = "0.2.162"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398"
[[package]]
name = "ppv-lite86"
version = "0.2.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04"
dependencies = [
"zerocopy",
]
[[package]]
name = "proc-macro2"
version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
"rand_chacha",
"rand_core",
]
[[package]]
name = "rand_chacha"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
"ppv-lite86",
"rand_core",
]
[[package]]
name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom",
]
[[package]]
name = "syn"
version = "2.0.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "unicode-ident"
version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "zerocopy"
version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
dependencies = [
"byteorder",
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
version = "0.7.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
"syn",
]

7
assignmentSix/Cargo.toml Normal file
View file

@ -0,0 +1,7 @@
[package]
name = "assignment_six"
version = "0.1.0"
edition = "2021"
[dependencies]
rand = "0.8.5"

1
assignmentSix/go_fish.rs Normal file
View file

@ -0,0 +1 @@
// import libraries, namespaces

437
assignmentSix/src/main.rs Normal file
View file

@ -0,0 +1,437 @@
// import libraries, namespaces
use std::io;
use std::io::Write;
use std::fmt;
use rand::Rng;
use rand::thread_rng;
use rand::seq::SliceRandom;
// enum for Rank
// TWO = 2, ... ACE
// implement fmt::Display
#[derive(PartialEq, Eq, Clone)]
enum Rank
{
None,
TWO = 2,
THREE,
FOUR,
FIVE,
SIX,
SEVEN,
EIGHT,
NINE,
TEN,
JACK,
QUEEN,
KING,
ACE
}
impl fmt::Display for Rank {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
// write!(f, "{}", self)
match self
{
Rank::None => write!(f, "{}", 'X'),
Rank::TWO => write!(f, "{}", 2),
Rank::THREE => write!(f, "{}", 3),
Rank::FOUR => write!(f, "{}", 4),
Rank::FIVE => write!(f, "{}", 5),
Rank::SIX => write!(f, "{}", 6),
Rank::SEVEN => write!(f, "{}", 7),
Rank::EIGHT => write!(f, "{}", 8),
Rank::NINE => write!(f, "{}", 9),
Rank::TEN => write!(f, "{}", 10),
Rank::JACK => write!(f, "{}", 'J'),
Rank::QUEEN => write!(f, "{}", 'Q'),
Rank::KING => write!(f, "{}", 'K'),
Rank::ACE => write!(f, "{}", 'A')
}
}
}
// impl PartialEq for Rank
// {
// fn eq(&self, other: &Self) -> bool
// {
// return rank_to_number(*self) == rank_to_number(*other);
// }
// }
fn number_to_rank(num_rank: i32) -> Rank
{
match num_rank
{
1 => Rank::ACE,
2 => Rank::TWO,
3 => Rank::THREE,
4 => Rank::FOUR,
5 => Rank::FIVE,
6 => Rank::SIX,
7 => Rank::SEVEN,
8 => Rank::EIGHT,
9 => Rank::NINE,
10 => Rank::TEN,
11 => Rank::JACK,
12 => Rank::QUEEN,
13 => Rank::KING,
_ => Rank::None
}
}
fn rank_to_number(in_rank: Rank) -> i32
{
match in_rank
{
Rank::ACE => 1,
Rank::TWO => 2,
Rank::THREE => 3,
Rank::FOUR => 4,
Rank::FIVE => 5,
Rank::SIX => 6,
Rank::SEVEN => 7,
Rank::EIGHT => 8,
Rank::NINE => 9,
Rank::TEN => 10,
Rank::JACK => 11,
Rank::QUEEN => 12,
Rank::KING => 13,
Rank::None => -1
}
}
// enum for Suit
// HEARTS, DIAMONDS, SPADES, CLUBS
// implement fmt::Display
#[derive(PartialEq, Eq, Clone)]
enum Suit
{
None,
HEARTS,
DIAMONDS,
SPADES,
CLUBS
}
impl fmt::Display for Suit {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self
{
Suit::None => write!(f, "{}", 'X'),
Suit::HEARTS => write!(f, "{}", 'H'),
Suit::DIAMONDS => write!(f, "{}", 'D'),
Suit::SPADES => write!(f, "{}", 'S'),
Suit::CLUBS => write!(f, "{}", 'C')
}
}
}
fn number_to_suit(num_suit: i32) -> Suit
{
match num_suit
{
1 => Suit::HEARTS,
2 => Suit::DIAMONDS,
3 => Suit::SPADES,
4 => Suit::CLUBS,
_ => Suit::None
}
}
// Card struct
// rank and suit variable
// implement fmt::Display
#[derive(Clone)]
struct Card
{
card_rank: Rank,
card_suit: Suit
}
impl fmt::Display for Card {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}{}", self.card_rank, self.card_suit)
}
}
// Deck struct
// vector of Cards
// new() method, [creates deck of cards, shuffles, return a deck object]
// shuffle() method [shuffles a deck object]
// draw() method ['draws' an card from the top (last) of the deck, return card]
// is_empty() method [returns t/f if the deck (reference) is empty]
struct Deck
{
card_deck: Vec<Card>
}
impl Deck
{
fn new() -> Deck
{
// create deck of cards
let mut full_deck = Deck
{
card_deck: vec![]
};
// to create deck,
// need a double for loop (or just loop with counter) to
// iterate through 2-A (or 0 to 12 / 1-13) for each suit (diamonds, etc.)
// add the card via index.
let mut suit_counter = 0;
let mut card_counter = 0;
loop
{
//
if suit_counter == 4
{
//
break;
}
else
{
loop
{
//
if card_counter == 13
{
//
break;
}
else
{
// create card here.
let temp_card = Card
{
card_rank: number_to_rank(card_counter + 1),
card_suit: number_to_suit(suit_counter + 1)
};
full_deck.card_deck.push(temp_card);
card_counter = card_counter + 1;
}
}
card_counter = 0;
suit_counter = suit_counter + 1;
}
}
// shuffle deck of cards
full_deck.card_deck.shuffle(&mut thread_rng());
// return deck struct
// deck
return full_deck;
}
fn shuffle(mut self) -> Deck
{
//
self.card_deck.shuffle(&mut thread_rng());
return self;
}
fn draw(mut self) -> Card
{
// return Card{cardRank: Rank::TWO, cardSuit: Suit::CLUBS};
let pull_card = self.card_deck.pop().unwrap();
return pull_card;
}
fn is_empty(&self) -> bool
{
//
return self.card_deck.is_empty();
}
}
// Player struct
// vector of cards [referred to as hand]
// new() method, [creates a new player object]
// add_cards() method [takes vector of cards, adds to player hand.]
// has_rank() method [accepts a Rank, returns vector of cards belonging to that
// rank, removes the cards from player hand]
// check_set() method [returns true if player has a set and removes the cards
// belonging to that set]
#[derive(Clone)]
struct Player
{
player_hand: Vec<Card>
}
impl Player
{
//
fn new() -> Player
{
//
let mut hand = Player
{
player_hand: vec![]
};
return hand;
}
fn add_cards(mut self, mut card_vec: Vec<Card>)
{
// loop until the card_vec is empty, add each card to the player hand.
loop
{
if card_vec.is_empty() != true
{
self.player_hand.push(card_vec.pop().unwrap());
}
}
}
fn has_rank(mut self, in_card_rank: Rank) -> Vec<Card>
{
// check to see if the rank matches any of the items in vector
// if they do match, remove from hand, place into temp vector,
// return temp vector.
let mut card_counter = 0;
let mut card_out = vec![];
loop
{
//
if self.player_hand.is_empty() || self.player_hand.len() > card_counter
{
//
break;
}
if self.player_hand.get(card_counter).unwrap().card_rank == in_card_rank
{
//
let current_card = Card
{
card_rank: self.player_hand.get(card_counter).unwrap().card_rank.clone(),
card_suit: self.player_hand.get(card_counter).unwrap().card_suit.clone(),
};
card_out.push(current_card);
self.player_hand.remove(card_counter);
}
card_counter = card_counter + 1;
}
return card_out;
}
fn check_set(&mut self) -> bool
{
// check to see if the vector (self.player_hand) has four of the same rank.
// if the player does, remove the cards, and return true,
// otherwise, return false.
let mut count = 0;
let mut rank_check = 0;
loop
{
if rank_check > 13
{
//
break;
}
//
for card in &self.player_hand
{
if card.card_rank == number_to_rank(rank_check)
{
count += 1;
}
}
if count >= 4
{
// let mut remove_counter = 0;
// //
// println!("Pre Loop: {}", self.player_hand.get(0).unwrap());
// println!("Pre Loop: {}", self.player_hand.get(1).unwrap());
// println!("Pre Loop: {}", self.player_hand.get(2).unwrap());
// println!("Pre Loop: {}", self.player_hand.get(3).unwrap());
// loop
// {
// if remove_counter > self.player_hand.len() - 1
// {
// //
// break;
// }
// println!("Loop: {}", self.player_hand.get(remove_counter).unwrap());
// if self.player_hand.get(remove_counter).unwrap().card_rank == number_to_rank(rank_check)
// {
// //
// self.player_hand.remove(remove_counter);
// }
// remove_counter = remove_counter + 1;
// // println!("After: {}", self.player_hand.get(remove_counter).unwrap());
// }
self.player_hand.retain(|card| card.card_rank != number_to_rank(rank_check));
return true;
}
// println!("{} count is: {}", rank_check, count);
rank_check = rank_check + 1;
count = 0;
}
return false;
}
}
// Game struct
// deck [main instance of deck]
// human player [instance of Player]
// computer player [instance of Player]
// new() method [returns new Game object]
// human_turn() [prompts the user to ask for a rank and check if the computer
// has the requested rank. If the card is available, it will transfer the cards
// to the human’s hand, otherwise, it will draw a card]
// computer_turn() [that generates a random rank and checks if the human has the
// requested rank. If the card is available, it will transfer the cards to the
// computer’s hand, otherwise, it will draw a card]
// play() [handles the gameplay by switching between the player’s turn and the
// computer’s turn and checks for the game to be completed]
// print_scores() [prints the final score of the players]
// winner() [returns name of the winner (player or computer)]
struct Game
{
// data
}
impl Game
{
// methods
}
fn main()
{
println!("Welcome to the Go Fish Game!");
println!("----------------------------");
// TEMP START
println!("Working game");
let mut current_player = Player::new();
current_player.player_hand.push(Card{card_rank: Rank::FIVE, card_suit: Suit::HEARTS});
current_player.player_hand.push(Card{card_rank: Rank::THREE, card_suit: Suit::CLUBS});
current_player.player_hand.push(Card{card_rank: Rank::FIVE, card_suit: Suit::DIAMONDS});
current_player.player_hand.push(Card{card_rank: Rank::ACE, card_suit: Suit::HEARTS});
current_player.player_hand.push(Card{card_rank: Rank::FIVE, card_suit: Suit::SPADES});
current_player.player_hand.push(Card{card_rank: Rank::FIVE, card_suit: Suit::CLUBS});
current_player.check_set();
for card in &current_player.player_hand
{
//
println!("{}", card);
}
// println!("{}{}", Rank::TWO, Suit::DIAMONDS);
// let tempCard = Card
// {
// cardRank: Rank::ACE,
// cardSuit: Suit::HEARTS
// };
// println!("{}", tempCard);
// deck creation works.
// let mut tempDeck = Deck::new();
// let mut cardCount = 52;
// loop
// {
// if cardCount == 0
// {
// break;
// }
// else
// {
// //
// println!("{}", tempDeck.cardDeck.get(cardCount - 1).unwrap());
// cardCount = cardCount - 1;
// }
// }
// println!("Drawn Card: {}", tempDeck.draw()); // verified works.
// tempDeck = tempDeck.shuffle(); // verified works
// TEMP END
// let mut game = Game::new();
// game.play();
// game.print_scores();
// println!("The winner is: {}", game.winner());
}

View file

@ -0,0 +1 @@
{"rustc_fingerprint":1598777996985963575,"outputs":{"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.82.0 (f6e511eec 2024-10-15)\nbinary: rustc\ncommit-hash: f6e511eec7342f59a25f7c0534f1dbea00d01b14\ncommit-date: 2024-10-15\nhost: x86_64-unknown-linux-gnu\nrelease: 1.82.0\nLLVM version: 19.1.1\n","stderr":""},"15729799797837862367":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/config/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}

View file

@ -0,0 +1,3 @@
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by cargo.
# For information about cache directory tags see https://bford.info/cachedir/

View file

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[]","declared_features":"[]","target":1167732766688756656,"profile":3626660381633431854,"path":10602529704205407992,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/assignmentSix-fe679840e72cfd4d/dep-bin-assignmentSix"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1,2 @@
{"$message_type":"diagnostic","message":"unused import: `std::io`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":36,"byte_end":43,"line_start":2,"line_end":2,"column_start":5,"column_end":12,"is_primary":true,"text":[{"text":"use std::io;","highlight_start":5,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":32,"byte_end":45,"line_start":2,"line_end":3,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use std::io;","highlight_start":1,"highlight_end":13},{"text":"","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `std::io`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:2:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m2\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::io;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"1 warning emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 1 warning emitted\u001b[0m\n\n"}

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[]","declared_features":"[]","target":14397390470676258616,"profile":3626660381633431854,"path":10602529704205407992,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/assignment_six-56e413aaf7d18e7f/dep-bin-assignment_six"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1,3 @@
{"$message_type":"diagnostic","message":"unused import: `std::io`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":36,"byte_end":43,"line_start":2,"line_end":2,"column_start":5,"column_end":12,"is_primary":true,"text":[{"text":"use std::io;","highlight_start":5,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":32,"byte_end":45,"line_start":2,"line_end":3,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use std::io;","highlight_start":1,"highlight_end":13},{"text":"","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `std::io`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:2:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m2\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::io;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"enum `Rank` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":114,"byte_end":118,"line_start":7,"line_end":7,"column_start":6,"column_end":10,"is_primary":true,"text":[{"text":"enum Rank","highlight_start":6,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: enum `Rank` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:7:6\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m7\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0menum Rank\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"}

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[]","declared_features":"[]","target":14397390470676258616,"profile":6929766844333714335,"path":10602529704205407992,"deps":[[5910892534286594076,"rand",false,10482097571563706883]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/assignment_six-8f570ff535dc4659/dep-bin-assignment_six"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1,12 @@
{"$message_type":"diagnostic","message":"unused import: `std::io`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":36,"byte_end":43,"line_start":2,"line_end":2,"column_start":5,"column_end":12,"is_primary":true,"text":[{"text":"use std::io;","highlight_start":5,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":32,"byte_end":45,"line_start":2,"line_end":3,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use std::io;","highlight_start":1,"highlight_end":13},{"text":"use std::io::Write;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `std::io`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:2:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m2\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::io;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"unused import: `rand::Rng`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":83,"byte_end":92,"line_start":5,"line_end":5,"column_start":5,"column_end":14,"is_primary":true,"text":[{"text":"use rand::Rng;","highlight_start":5,"highlight_end":14}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":79,"byte_end":94,"line_start":5,"line_end":6,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use rand::Rng;","highlight_start":1,"highlight_end":15},{"text":"use rand::thread_rng;","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `rand::Rng`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:5:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m5\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse rand::Rng;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"unused import: `std::io::Write`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":49,"byte_end":63,"line_start":3,"line_end":3,"column_start":5,"column_end":19,"is_primary":true,"text":[{"text":"use std::io::Write;","highlight_start":5,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `std::io::Write`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:3:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m3\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::io::Write;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"variable does not need to be mutable","code":{"code":"unused_mut","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":6311,"byte_end":6319,"line_start":259,"line_end":259,"column_start":13,"column_end":21,"is_primary":true,"text":[{"text":" let mut hand = Player","highlight_start":13,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_mut)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove this `mut`","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":6311,"byte_end":6315,"line_start":259,"line_end":259,"column_start":13,"column_end":17,"is_primary":true,"text":[{"text":" let mut hand = Player","highlight_start":13,"highlight_end":17}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: variable does not need to be mutable\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:259:13\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m259\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m let mut hand = Player\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m----\u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mhelp: remove this `mut`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_mut)]` on by default\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"function `rank_to_number` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":1820,"byte_end":1834,"line_start":80,"line_end":80,"column_start":4,"column_end":18,"is_primary":true,"text":[{"text":"fn rank_to_number(in_rank: Rank) -> i32","highlight_start":4,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: function `rank_to_number` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:80:4\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m80\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn rank_to_number(in_rank: Rank) -> i32\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"variant `None` is never constructed","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":2361,"byte_end":2365,"line_start":105,"line_end":105,"column_start":6,"column_end":10,"is_primary":false,"text":[{"text":"enum Suit","highlight_start":6,"highlight_end":10}],"label":"variant in this enum","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":2372,"byte_end":2376,"line_start":107,"line_end":107,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":" None,","highlight_start":5,"highlight_end":9}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`Suit` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: variant `None` is never constructed\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:107:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m105\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0menum Suit\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m----\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mvariant in this enum\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m106\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m{\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m107\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m None,\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `Suit` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"function `number_to_suit` is never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":2819,"byte_end":2833,"line_start":126,"line_end":126,"column_start":4,"column_end":18,"is_primary":true,"text":[{"text":"fn number_to_suit(num_suit: i32) -> Suit","highlight_start":4,"highlight_end":18}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: function `number_to_suit` is never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:126:4\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m126\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mfn number_to_suit(num_suit: i32) -> Suit\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"struct `Deck` is never constructed","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":3634,"byte_end":3638,"line_start":160,"line_end":160,"column_start":8,"column_end":12,"is_primary":true,"text":[{"text":"struct Deck","highlight_start":8,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: struct `Deck` is never constructed\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:160:8\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m160\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mstruct Deck\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"associated items `new`, `shuffle`, `draw`, and `is_empty` are never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":3669,"byte_end":3678,"line_start":165,"line_end":165,"column_start":1,"column_end":10,"is_primary":false,"text":[{"text":"impl Deck","highlight_start":1,"highlight_end":10}],"label":"associated items in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":3688,"byte_end":3691,"line_start":167,"line_end":167,"column_start":8,"column_end":11,"is_primary":true,"text":[{"text":" fn new() -> Deck","highlight_start":8,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":5273,"byte_end":5280,"line_start":220,"line_end":220,"column_start":8,"column_end":15,"is_primary":true,"text":[{"text":" fn shuffle(mut self) -> Deck","highlight_start":8,"highlight_end":15}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":5401,"byte_end":5405,"line_start":226,"line_end":226,"column_start":8,"column_end":12,"is_primary":true,"text":[{"text":" fn draw(mut self) -> Card","highlight_start":8,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":5592,"byte_end":5600,"line_start":232,"line_end":232,"column_start":8,"column_end":16,"is_primary":true,"text":[{"text":" fn is_empty(&self) -> bool","highlight_start":8,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: associated items `new`, `shuffle`, `draw`, and `is_empty` are never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:167:8\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m165\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mimpl Deck\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m---------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12massociated items in this implementation\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m166\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m{\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m167\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m fn new() -> Deck\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m220\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m fn shuffle(mut self) -> Deck\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m226\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m fn draw(mut self) -> Card\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m232\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m fn is_empty(&self) -> bool\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"methods `add_cards` and `has_rank` are never used","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":6238,"byte_end":6249,"line_start":253,"line_end":253,"column_start":1,"column_end":12,"is_primary":false,"text":[{"text":"impl Player","highlight_start":1,"highlight_end":12}],"label":"methods in this implementation","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":6416,"byte_end":6425,"line_start":265,"line_end":265,"column_start":8,"column_end":17,"is_primary":true,"text":[{"text":" fn add_cards(mut self, mut card_vec: Vec<Card>)","highlight_start":8,"highlight_end":17}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":6727,"byte_end":6735,"line_start":276,"line_end":276,"column_start":8,"column_end":16,"is_primary":true,"text":[{"text":" fn has_rank(mut self, in_card_rank: Rank) -> Vec<Card>","highlight_start":8,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: methods `add_cards` and `has_rank` are never used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:265:8\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m253\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mimpl Player\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m-----------\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12mmethods in this implementation\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m265\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m fn add_cards(mut self, mut card_vec: Vec<Card>)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m...\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m276\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m fn has_rank(mut self, in_card_rank: Rank) -> Vec<Card>\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"struct `Game` is never constructed","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":10788,"byte_end":10792,"line_start":378,"line_end":378,"column_start":8,"column_end":12,"is_primary":true,"text":[{"text":"struct Game","highlight_start":8,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: struct `Game` is never constructed\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:378:8\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m378\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0mstruct Game\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"11 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 11 warnings emitted\u001b[0m\n\n"}

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[]","declared_features":"[]","target":14397390470676258616,"profile":3626660381633431854,"path":10602529704205407992,"deps":[[5910892534286594076,"rand",false,3422826367373097447]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/assignment_six-b3c4b652d6f65772/dep-bin-assignment_six"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[]","declared_features":"[]","target":14397390470676258616,"profile":6929766844333714335,"path":10602529704205407992,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/assignment_six-eba19bf8466208f8/dep-bin-assignment_six"}}],"rustflags":[],"metadata":7797948686568424061,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1,2 @@
{"$message_type":"diagnostic","message":"unused import: `std::io`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":36,"byte_end":43,"line_start":2,"line_end":2,"column_start":5,"column_end":12,"is_primary":true,"text":[{"text":"use std::io;","highlight_start":5,"highlight_end":12}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":32,"byte_end":45,"line_start":2,"line_end":3,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"use std::io;","highlight_start":1,"highlight_end":13},{"text":"","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `std::io`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:2:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m2\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0muse std::io;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
{"$message_type":"diagnostic","message":"1 warning emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 1 warning emitted\u001b[0m\n\n"}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
9380252104391dde

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[]","declared_features":"[\"default\", \"i128\", \"std\"]","target":16903832911151110546,"profile":16690480377348987070,"path":6151877408645720498,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/byteorder-42f5e31afd6b9d00/dep-lib-byteorder"}}],"rustflags":[],"metadata":5398730104718078656,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
2b51c7a859e7feac

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[]","declared_features":"[\"default\", \"i128\", \"std\"]","target":16903832911151110546,"profile":1740343547499479105,"path":6151877408645720498,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/byteorder-c8a48e95d7d36d9b/dep-lib-byteorder"}}],"rustflags":[],"metadata":5398730104718078656,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
ea80de2f0a9bd2ea

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[]","declared_features":"[\"compiler_builtins\", \"core\", \"rustc-dep-of-std\"]","target":11601024444410784892,"profile":1740343547499479105,"path":18340080909893445307,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cfg-if-b42db8c786d4762b/dep-lib-cfg_if"}}],"rustflags":[],"metadata":8462187951337715540,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
533c5f13cd0639db

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[]","declared_features":"[\"compiler_builtins\", \"core\", \"rustc-dep-of-std\"]","target":11601024444410784892,"profile":16690480377348987070,"path":18340080909893445307,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/cfg-if-f331783c409103a0/dep-lib-cfg_if"}}],"rustflags":[],"metadata":8462187951337715540,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
45ede719b43dfd7c

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[\"std\"]","declared_features":"[\"compiler_builtins\", \"core\", \"custom\", \"js\", \"js-sys\", \"linux_disable_fallback\", \"rdrand\", \"rustc-dep-of-std\", \"std\", \"test-in-browser\", \"wasm-bindgen\"]","target":11884987481660704207,"profile":1740343547499479105,"path":16415652753838674387,"deps":[[2452538001284770427,"cfg_if",false,16920757218039464170],[9681455366489049881,"libc",false,1543779203500211919]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/getrandom-45bdda842357bb8b/dep-lib-getrandom"}}],"rustflags":[],"metadata":12606519392706294666,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
5188622fc7dba48b

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[\"std\"]","declared_features":"[\"compiler_builtins\", \"core\", \"custom\", \"js\", \"js-sys\", \"linux_disable_fallback\", \"rdrand\", \"rustc-dep-of-std\", \"std\", \"test-in-browser\", \"wasm-bindgen\"]","target":11884987481660704207,"profile":16690480377348987070,"path":16415652753838674387,"deps":[[2452538001284770427,"cfg_if",false,15796664645841796179],[9681455366489049881,"libc",false,754204455422100164]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/getrandom-6689b8682a0efa2f/dep-lib-getrandom"}}],"rustflags":[],"metadata":12606519392706294666,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
cffe439c019b6c15

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[]","declared_features":"[\"align\", \"const-extern-fn\", \"default\", \"extra_traits\", \"rustc-dep-of-std\", \"rustc-std-workspace-core\", \"std\", \"use_std\"]","target":7478490212225406400,"profile":1740343547499479105,"path":7311911841584074802,"deps":[[9681455366489049881,"build_script_build",false,17658878919044686077]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/libc-0f3a62e7134d6d69/dep-lib-libc"}}],"rustflags":[],"metadata":14998826085014762512,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[9681455366489049881,"build_script_build",false,6384743254044641990]],"local":[{"RerunIfChanged":{"output":"debug/build/libc-636ac9902469878f/output","paths":["build.rs"]}}],"rustflags":[],"metadata":0,"config":0,"compile_kind":0}

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[]","declared_features":"[\"align\", \"const-extern-fn\", \"default\", \"extra_traits\", \"rustc-dep-of-std\", \"rustc-std-workspace-core\", \"std\", \"use_std\"]","target":6423576478976419116,"profile":8861558584828204938,"path":12426026800385038555,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/libc-afe485abe5da742f/dep-build-script-build-script-build"}}],"rustflags":[],"metadata":14998826085014762512,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
c48273cdf478770a

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[]","declared_features":"[\"align\", \"const-extern-fn\", \"default\", \"extra_traits\", \"rustc-dep-of-std\", \"rustc-std-workspace-core\", \"std\", \"use_std\"]","target":7478490212225406400,"profile":16690480377348987070,"path":7311911841584074802,"deps":[[9681455366489049881,"build_script_build",false,17658878919044686077]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/libc-c87f08534a89d6f5/dep-lib-libc"}}],"rustflags":[],"metadata":14998826085014762512,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
d751c8f3ce025482

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[\"simd\", \"std\"]","declared_features":"[\"default\", \"no_simd\", \"simd\", \"std\"]","target":8308082377415523989,"profile":16690480377348987070,"path":5727756654704970516,"deps":[[8776983334904785487,"zerocopy",false,5338114187163397434]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/ppv-lite86-4511c42a4a79b51b/dep-lib-ppv_lite86"}}],"rustflags":[],"metadata":14155036307809790115,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
5d2c02682019fd52

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[\"simd\", \"std\"]","declared_features":"[\"default\", \"no_simd\", \"simd\", \"std\"]","target":8308082377415523989,"profile":1740343547499479105,"path":5727756654704970516,"deps":[[8776983334904785487,"zerocopy",false,6783859130513103347]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/ppv-lite86-f58c492a658f12c8/dep-lib-ppv_lite86"}}],"rustflags":[],"metadata":14155036307809790115,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
d4171b7f6453bc16

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[\"default\", \"proc-macro\"]","declared_features":"[\"default\", \"nightly\", \"proc-macro\", \"span-locations\"]","target":13874121960490935825,"profile":8861558584828204938,"path":9619438624387295638,"deps":[[11851334758748276410,"unicode_ident",false,3968698245807529356],[12252124046087733614,"build_script_build",false,13134879186015436577]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/proc-macro2-6fac53eb18c4d04b/dep-lib-proc_macro2"}}],"rustflags":[],"metadata":7635439851376710101,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[\"default\", \"proc-macro\"]","declared_features":"[\"default\", \"nightly\", \"proc-macro\", \"span-locations\"]","target":9652763411108993936,"profile":8861558584828204938,"path":12025658123354058195,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/proc-macro2-af373eff3cd1001c/dep-build-script-build-script-build"}}],"rustflags":[],"metadata":7635439851376710101,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[12252124046087733614,"build_script_build",false,2658498324757630464]],"local":[{"RerunIfChanged":{"output":"debug/build/proc-macro2-afe233d169e25233/output","paths":["build/probe.rs"]}},{"RerunIfEnvChanged":{"var":"RUSTC_BOOTSTRAP","val":null}}],"rustflags":[],"metadata":0,"config":0,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
e2966add2b5751ff

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[\"default\", \"proc-macro\"]","declared_features":"[\"default\", \"proc-macro\"]","target":10650096451693058429,"profile":8861558584828204938,"path":7631908156644436970,"deps":[[12252124046087733614,"proc_macro2",false,1638276055550334932]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/quote-ec06efd89bc1239b/dep-lib-quote"}}],"rustflags":[],"metadata":2717943770976187624,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
e7391d3b7252802f

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[\"alloc\", \"default\", \"getrandom\", \"libc\", \"rand_chacha\", \"std\", \"std_rng\"]","declared_features":"[\"alloc\", \"default\", \"getrandom\", \"libc\", \"log\", \"min_const_gen\", \"nightly\", \"packed_simd\", \"rand_chacha\", \"serde\", \"serde1\", \"simd_support\", \"small_rng\", \"std\", \"std_rng\"]","target":721237385257707553,"profile":1740343547499479105,"path":16793238836066114754,"deps":[[1565494060434293766,"rand_core",false,10252958930437901203],[9681455366489049881,"libc",false,1543779203500211919],[12017018019769837221,"rand_chacha",false,12531855619306146221]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/rand-67f6f377d98decd3/dep-lib-rand"}}],"rustflags":[],"metadata":16964019146302480911,"config":2202906307356721367,"compile_kind":0}

View file

@ -0,0 +1 @@
This file has an mtime of when this was started.

View file

@ -0,0 +1 @@
031a0a6e34e47791

View file

@ -0,0 +1 @@
{"rustc":2484451964687019519,"features":"[\"alloc\", \"default\", \"getrandom\", \"libc\", \"rand_chacha\", \"std\", \"std_rng\"]","declared_features":"[\"alloc\", \"default\", \"getrandom\", \"libc\", \"log\", \"min_const_gen\", \"nightly\", \"packed_simd\", \"rand_chacha\", \"serde\", \"serde1\", \"simd_support\", \"small_rng\", \"std\", \"std_rng\"]","target":721237385257707553,"profile":16690480377348987070,"path":16793238836066114754,"deps":[[1565494060434293766,"rand_core",false,6583152056701272114],[9681455366489049881,"libc",false,754204455422100164],[12017018019769837221,"rand_chacha",false,3860036530508478440]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/rand-7f4eba709a42e900/dep-lib-rand"}}],"rustflags":[],"metadata":16964019146302480911,"config":2202906307356721367,"compile_kind":0}

Some files were not shown because too many files have changed in this diff Show more