mirror of
https://github.com/house-of-vanity/desubot.git
synced 2025-07-06 20:24:08 +00:00
Bump mystem lib. Lint code.
This commit is contained in:
@ -33,5 +33,5 @@ subprocess = "0.2.6"
|
||||
serde_json = "1.0"
|
||||
markov = "1.1.0"
|
||||
rand = "0.7.3"
|
||||
mystem = "0.2"
|
||||
mystem = "0.2.1"
|
||||
async-trait = "0.1.42"
|
@ -6,8 +6,8 @@ use markov::Chain;
|
||||
use mystem::Case::Nominative;
|
||||
use mystem::Gender::Feminine;
|
||||
use mystem::Tense::{Inpresent, Past};
|
||||
use mystem::VerbPerson::First;
|
||||
use mystem::{MyStem, VerbPerson};
|
||||
use mystem::Person::First;
|
||||
use mystem::MyStem;
|
||||
use rand::seq::SliceRandom;
|
||||
use rand::Rng;
|
||||
use regex::Regex;
|
||||
@ -81,6 +81,7 @@ impl Execute for Here {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
async fn run_mystem(
|
||||
&self,
|
||||
api: Api,
|
||||
@ -117,6 +118,7 @@ impl Execute for Top {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
async fn run_mystem(
|
||||
&self,
|
||||
api: Api,
|
||||
@ -150,6 +152,7 @@ impl Execute for MarkovAll {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
async fn run_mystem(
|
||||
&self,
|
||||
api: Api,
|
||||
@ -183,6 +186,7 @@ impl Execute for Markov {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
async fn run_mystem(
|
||||
&self,
|
||||
api: Api,
|
||||
@ -195,10 +199,12 @@ impl Execute for Markov {
|
||||
|
||||
#[async_trait]
|
||||
impl Execute for Omedeto {
|
||||
#[allow(unused_variables)]
|
||||
async fn run(&self, api: Api, message: Message) -> Result<(), Error> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
#[warn(unused_must_use)]
|
||||
async fn run_mystem(
|
||||
&self,
|
||||
api: Api,
|
||||
@ -355,7 +361,7 @@ impl Execute for Omedeto {
|
||||
}
|
||||
}
|
||||
})
|
||||
.collect::<()>();
|
||||
.for_each(drop);
|
||||
//debug!("fm - {}, mu - {}", fm, mu);
|
||||
if fm >= mu {
|
||||
true
|
||||
|
@ -1,6 +1,5 @@
|
||||
use crate::errors;
|
||||
use crate::utils;
|
||||
use futures::StreamExt;
|
||||
use rusqlite::{named_params, params, Connection, Error, Result};
|
||||
use std::time::SystemTime;
|
||||
use telegram_bot::*;
|
||||
@ -136,6 +135,7 @@ pub(crate) async fn get_messages_random_group(
|
||||
Ok(messages)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(crate) async fn get_messages_user_group(
|
||||
message: &telegram_bot::Message,
|
||||
) -> Result<Vec<String>, Error> {
|
||||
@ -400,6 +400,7 @@ async fn add_relation(word_id: i64, msg_id: i64, message: &Message) -> Result<i6
|
||||
Ok(rowid)
|
||||
}
|
||||
|
||||
#[allow(unused_must_use)]
|
||||
pub(crate) async fn add_sentence(
|
||||
message: &telegram_bot::Message,
|
||||
mystem: &mut mystem::MyStem,
|
||||
|
@ -104,7 +104,7 @@ pub async fn handler(
|
||||
.await?
|
||||
}
|
||||
"/markov" => {
|
||||
MarkovAll {
|
||||
Markov {
|
||||
data: "".to_string(),
|
||||
}
|
||||
.run(api, message)
|
||||
|
Reference in New Issue
Block a user