automatic cargo CI changes
cargo devel CI / cargo CI (push) Successful in 1m36s Details

This commit is contained in:
cscherrNT 2024-07-22 10:33:57 +00:00 committed by github-actions[bot]
parent 3b0eec9032
commit 5f32f8227f
10 changed files with 24 additions and 24 deletions

View File

@ -1,12 +1,7 @@
use chrono::{self, Duration, NaiveDateTime, NaiveTime, TimeDelta};
use core::panic;
use chrono::{self, NaiveDateTime, TimeDelta};
use libpt::log::debug;
use std::fmt::Display;
use std::ops::Div;
use rayon::prelude::*;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use std::fmt::Display;
use crate::game::response::GuessResponse;
use crate::game::Game;

View File

@ -8,9 +8,7 @@ use clap::Parser;
use libpt::log::*;
use wordle_analyzer::bench::builtin::BuiltinBenchmark;
use wordle_analyzer::bench::report::Report;
use wordle_analyzer::bench::{Benchmark, DEFAULT_N};
use wordle_analyzer::error::WResult;
use wordle_analyzer::game::GameBuilder;
use wordle_analyzer::solve::{AnyBuiltinSolver, BuiltinSolverNames, Solver};
use wordle_analyzer::wlist::builtin::BuiltinWList;

View File

@ -51,5 +51,5 @@ pub enum GameError {
#[derive(Debug, Clone, Error)]
pub enum BenchError {
#[error("Trying to modify a finished report")]
ModifyFinishedReport
ModifyFinishedReport,
}

View File

@ -1,5 +1,5 @@
use crate::error::*;
use crate::wlist::word::{ManyWordDatas, ManyWordsRef, Word, WordData};
use crate::wlist::word::{ManyWordsRef, Word, WordData};
use crate::wlist::WordList;
use libpt::log::{debug, trace};

View File

@ -1,8 +1,6 @@
use crate::wlist::word::{Word, WordData};
use crate::wlist::WordList;
use anyhow::Ok;
use colored::{ColoredString, Colorize};
use libpt::log::debug;
use colored::Colorize;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use std::fmt::Display;

View File

@ -6,6 +6,12 @@ pub struct Summary<'wl, WL: WordList> {
data: Vec<&'wl Game<'wl, WL>>,
}
impl<'wl, WL: WordList> Default for Summary<'wl, WL> {
fn default() -> Self {
Self::new()
}
}
impl<'wl, WL: WordList> Summary<'wl, WL> {
pub fn new() -> Self {
Self { data: Vec::new() }

View File

@ -2,7 +2,7 @@ use std::{fmt::Display, str::FromStr};
use crate::{
error::{Error, WResult},
game::{response::*, summary::Summary, Game},
game::{response::*, Game},
wlist::{
word::{Word, WordData},
WordList,

View File

@ -1,4 +1,4 @@
use libpt::log::{debug, info, trace};
use libpt::log::{info, trace};
use crate::wlist::word::{ManyWordDatas, Word};
use crate::wlist::WordList;

View File

@ -1,4 +1,3 @@
use libpt::log::debug;
use rand::seq::IteratorRandom;
use regex::Regex;
@ -71,7 +70,7 @@ pub trait WordList: Clone + std::fmt::Debug + Default + Sync {
fn raw_wordlist(&self) -> String {
let mut buf = String::new();
for w in self.wordmap().keys() {
buf += &w;
buf += w;
buf += "\n";
}
buf

View File

@ -1,8 +1,7 @@
use std::collections::HashMap;
use std::fmt::write;
use std::hash::Hash;
use libpt::log::{debug, trace};
use libpt::log::trace;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
@ -21,6 +20,12 @@ pub struct WordMap {
inner: HashMap<Word, Frequency>,
}
impl Default for WordMap {
fn default() -> Self {
Self::new()
}
}
impl WordMap {
pub fn new() -> Self {
Self {
@ -68,10 +73,9 @@ impl WordMap {
&self.inner
}
pub fn get<I: std::fmt::Display>(&self, word: I) -> Option<WordData> {
match self.inner.get(&word.to_string()) {
Some(f) => Some((word.to_string(), *f)),
None => None,
}
self.inner
.get(&word.to_string())
.map(|f| (word.to_string(), *f))
}
pub fn from_absolute(abs: HashMap<Word, usize>) -> Self {
let n: f64 = abs.keys().len() as f64;