From 0d43ed61c4144cfcec48a3250a08632613fcdc76 Mon Sep 17 00:00:00 2001 From: Joel Therrien <joel@joeltherrien.ca> Date: Thu, 20 Feb 2025 21:10:43 -0800 Subject: [PATCH] chore: Run cargo fix --edition --- server/Cargo.toml | 2 +- wasm/Cargo.toml | 2 +- wordgrid/Cargo.toml | 2 +- wordgrid/src/game.rs | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/Cargo.toml b/server/Cargo.toml index c8aa042..f7d6d5a 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "server" version = "0.1.0" -edition = "2021" +edition = "2024" # We manually specify for better caching in Podman [[bin]] diff --git a/wasm/Cargo.toml b/wasm/Cargo.toml index e1402ed..7026b74 100644 --- a/wasm/Cargo.toml +++ b/wasm/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "wasm" version = "0.1.0" -edition = "2021" +edition = "2024" # We manually specify path for better caching in Podman [lib] diff --git a/wordgrid/Cargo.toml b/wordgrid/Cargo.toml index 06fbd46..3c8eeb7 100644 --- a/wordgrid/Cargo.toml +++ b/wordgrid/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "word_grid" version = "0.1.0" -edition = "2021" +edition = "2024" authors = ["Joel Therrien"] repository = "https://git.joeltherrien.ca/joel/WordGrid" license = "AGPL-3" diff --git a/wordgrid/src/game.rs b/wordgrid/src/game.rs index b6d5824..88e0fb3 100644 --- a/wordgrid/src/game.rs +++ b/wordgrid/src/game.rs @@ -485,7 +485,7 @@ impl Game { .get_player_state_mut(¤t_player) .ok_or(Error::InvalidPlayer(current_player.clone()))?; - if let Player::AI { object, .. } = &mut state.player { + match &mut state.player { Player::AI { object, .. } => { let tray = &mut state.tray; let best_move = object.find_best_move(tray, &self.board, &mut self.rng); @@ -537,14 +537,14 @@ impl Game { )) } } - } else { + } _ => { Ok(( TurnAdvanceResult::HumanInputRequired { name: self.current_player_name(), }, self.get_state(), )) - } + }} } pub fn get_remaining_tiles(&self) -> usize {