From 87a41d66038faab83f00d5c92fce2721e551ff49 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 24 Jul 2024 12:01:14 +0200 Subject: [PATCH] chore: fix warning --- src/bin/bench/cli.rs | 6 +++--- src/bin/game/tui.rs | 1 - src/bin/solve/simple.rs | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/bin/bench/cli.rs b/src/bin/bench/cli.rs index c153eb6..cda7541 100644 --- a/src/bin/bench/cli.rs +++ b/src/bin/bench/cli.rs @@ -2,7 +2,7 @@ // #![warn(missing_docs)] #![warn(missing_debug_implementations)] -use std::thread::sleep_ms; +use std::thread::sleep; use clap::Parser; use libpt::log::*; @@ -10,7 +10,7 @@ use libpt::log::*; use wordle_analyzer::bench::builtin::BuiltinBenchmark; use wordle_analyzer::bench::{Benchmark, DEFAULT_N}; use wordle_analyzer::game::GameBuilder; -use wordle_analyzer::solve::{AnyBuiltinSolver, BuiltinSolverNames, Solver}; +use wordle_analyzer::solve::{AnyBuiltinSolver, BuiltinSolverNames}; use wordle_analyzer::wlist::builtin::BuiltinWList; use wordle_analyzer::{self, game}; @@ -64,7 +64,7 @@ fn main() -> anyhow::Result<()> { bench.start(50, &bench.builder())?; loop { - sleep_ms(1000); + sleep(std::time::Duration::from_secs(1)); println!("{}", bench.report()); if bench.is_finished() { break; diff --git a/src/bin/game/tui.rs b/src/bin/game/tui.rs index f2829d1..a1c6413 100644 --- a/src/bin/game/tui.rs +++ b/src/bin/game/tui.rs @@ -1,5 +1,4 @@ #![warn(clippy::all)] -#![warn(missing_docs)] #![warn(missing_debug_implementations)] fn main() { unimplemented!(); diff --git a/src/bin/solve/simple.rs b/src/bin/solve/simple.rs index 8da8854..084db61 100644 --- a/src/bin/solve/simple.rs +++ b/src/bin/solve/simple.rs @@ -6,7 +6,7 @@ use clap::{Parser, Subcommand}; use libpt::cli::console::style; use libpt::cli::{repl::Repl, strum}; use libpt::log::*; -use strum::{EnumIter, IntoEnumIterator}; +use strum::EnumIter; use wordle_analyzer::game::evaluation::Evaluation; use wordle_analyzer::game::response::GuessResponse; @@ -167,7 +167,7 @@ fn help_guess_interactive(cli: Cli) -> anyhow::Result<()> { Ok(()) } -fn wlcommand_handler(cli: &Cli, cmd: &WlCommand, wl: &impl WordList) -> anyhow::Result<()> { +fn wlcommand_handler(_cli: &Cli, cmd: &WlCommand, wl: &impl WordList) -> anyhow::Result<()> { match cmd { WlCommand::Stats => { println!("{wl}")