From 24d3ef05b78307039a777af1b97603dbfb727e6a Mon Sep 17 00:00:00 2001 From: cscherrNT Date: Fri, 22 Mar 2024 13:13:33 +0000 Subject: [PATCH] automatic cargo CI changes --- src/bin/solve/simple.rs | 12 ++++-------- src/error.rs | 2 +- src/game/mod.rs | 2 +- src/game/response.rs | 6 +++++- src/solve/naive/mod.rs | 1 + 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/bin/solve/simple.rs b/src/bin/solve/simple.rs index 7b1c2aa..2b3d28f 100644 --- a/src/bin/solve/simple.rs +++ b/src/bin/solve/simple.rs @@ -1,14 +1,12 @@ #![warn(clippy::all)] // #![warn(missing_docs)] #![warn(missing_debug_implementations)] -use std::io::Write; use clap::Parser; use libpt::log::*; -use wordle_analyzer::error::GameError; + use wordle_analyzer::game::response::GuessResponse; -use wordle_analyzer::game::Game; use wordle_analyzer::solve::{stupid, BuiltinSolvers, Solver}; use wordle_analyzer::wlist::builtin::BuiltinWList; use wordle_analyzer::wlist::word::Word; @@ -49,17 +47,15 @@ fn main() -> anyhow::Result<()> { .max_steps(cli.max_steps) .precompute(cli.precompute); let solver = match cli.solver { - BuiltinSolvers::Naive => { - stupid::StupidSolver::build(&wl)? - }, - _ => todo!() + BuiltinSolvers::Naive => stupid::StupidSolver::build(&wl)?, + _ => todo!(), }; let mut game = builder.build()?; debug!("{game:#?}"); let mut response: GuessResponse; - let mut guess: Word; + let mut _guess: Word; loop { response = solver.play(&mut game)?; println!("{response}"); diff --git a/src/error.rs b/src/error.rs index 8b1b880..ab98955 100644 --- a/src/error.rs +++ b/src/error.rs @@ -17,7 +17,7 @@ pub enum Error { }, // for `FromStr` of `BuiltinSolver` #[error("Unknown builtin solver")] - UnknownBuiltinSolver + UnknownBuiltinSolver, } #[derive(Debug, Clone, Error)] diff --git a/src/game/mod.rs b/src/game/mod.rs index be12292..ab40bc3 100644 --- a/src/game/mod.rs +++ b/src/game/mod.rs @@ -178,7 +178,7 @@ impl<'wl, WL: WordList> GameBuilder<'wl, WL> { length: super::DEFAULT_WORD_LENGTH, precompute: false, max_steps: super::DEFAULT_MAX_STEPS, - wordlist: wl + wordlist: wl, } } diff --git a/src/game/response.rs b/src/game/response.rs index a74303f..d14f02c 100644 --- a/src/game/response.rs +++ b/src/game/response.rs @@ -25,7 +25,11 @@ pub enum Status { } impl GuessResponse { - pub(crate) fn new(guess: Word, status: Vec<(char, Status)>, game: &Game) -> Self { + pub(crate) fn new( + guess: Word, + status: Vec<(char, Status)>, + game: &Game, + ) -> Self { let finish: bool = if game.step() > game.max_steps() { true } else { diff --git a/src/solve/naive/mod.rs b/src/solve/naive/mod.rs index e69de29..8b13789 100644 --- a/src/solve/naive/mod.rs +++ b/src/solve/naive/mod.rs @@ -0,0 +1 @@ +