clippy: fix warnings

This commit is contained in:
Akulij 2025-05-02 14:50:27 +03:00
parent abc26d7be0
commit d3c8b7605d
2 changed files with 2 additions and 5 deletions

View File

@ -122,7 +122,6 @@ impl DB {
} }
pub async fn migrate(&mut self) -> DbResult<()> { pub async fn migrate(&mut self) -> DbResult<()> {
let db = self.get_database().await;
/// some migrations doesn't realy need type of collection /// some migrations doesn't realy need type of collection
type AnyCollection = Event; type AnyCollection = Event;
let events = self.get_database().await.collection::<Event>("events"); let events = self.get_database().await.collection::<Event>("events");

View File

@ -14,8 +14,7 @@ use crate::db::{CallDB, DB};
use crate::mongodb_storage::MongodbStorage; use crate::mongodb_storage::MongodbStorage;
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use chrono_tz::Asia; use db::DbError;
use db::{DbError, Literal};
use envconfig::Envconfig; use envconfig::Envconfig;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use teloxide::dispatching::dialogue::serializer::Json; use teloxide::dispatching::dialogue::serializer::Json;
@ -792,8 +791,7 @@ async fn replace_message(
"video" => InputMedia::Video(teloxide::types::InputMediaVideo::new(input_file)), "video" => InputMedia::Video(teloxide::types::InputMediaVideo::new(input_file)),
_ => todo!(), _ => todo!(),
}; };
let msg = bot bot.edit_message_media(ChatId(chat_id), MessageId(message_id), media)
.edit_message_media(ChatId(chat_id), MessageId(message_id), media)
.await?; .await?;
let msg = bot.edit_message_caption(ChatId(chat_id), MessageId(message_id)); let msg = bot.edit_message_caption(ChatId(chat_id), MessageId(message_id));