From 3eb08934749e4758a04f7fc8f2cccd83a0b1fda8 Mon Sep 17 00:00:00 2001 From: timotree3 Date: Thu, 19 Jan 2023 23:30:55 -0500 Subject: [PATCH] Fix warnings --- src/game.rs | 4 ++-- src/simulator.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/game.rs b/src/game.rs index d06ce4d..bbe80a7 100644 --- a/src/game.rs +++ b/src/game.rs @@ -589,7 +589,7 @@ impl GameState { .collect::>(); let unannotated_hands = hands .iter() - .map(|(player, hand)| (player.clone(), strip_annotations(hand))) + .map(|(player, hand)| (*player, strip_annotations(hand))) .collect::>(); GameState { @@ -629,7 +629,7 @@ impl GameState { } fn update_player_hand(&mut self) { - let player = self.board.player.clone(); + let player = self.board.player; self.unannotated_hands .insert(player, strip_annotations(self.hands.get(&player).unwrap())); } diff --git a/src/simulator.rs b/src/simulator.rs index 84727a1..3467ef5 100644 --- a/src/simulator.rs +++ b/src/simulator.rs @@ -199,8 +199,8 @@ where } } let (game, json_output) = simulate_once( - &opts, - strat_config_ref.initialize(&opts), + opts, + strat_config_ref.initialize(opts), seed, json_output_pattern_ref.is_some(), );