Updated dependencies

This commit is contained in:
2025-08-17 17:10:04 +03:00
parent 0f2963b0cf
commit ea2401a486
6 changed files with 471 additions and 484 deletions

938
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -27,7 +27,7 @@ derive_more = { version = "2", features = [
"from", "from",
] } ] }
dotenvy = "0.15" dotenvy = "0.15"
foldhash = "0.1.4" foldhash = "0.2"
futures = "0.3" futures = "0.3"
fuzzy-matcher = "0.3" fuzzy-matcher = "0.3"
hex = "0.4" hex = "0.4"
@@ -49,7 +49,7 @@ sqlx = { version = "0.8", features = [
"migrate", "migrate",
] } ] }
subtle = "2" subtle = "2"
teloxide = { version = "0.15", features = [ teloxide = { version = "0.17", features = [
"macros", "macros",
"ctrlc_handler", "ctrlc_handler",
"rustls", "rustls",
@@ -62,7 +62,7 @@ tokio = { version = "1", features = [
"sync", "sync",
"parking_lot", "parking_lot",
] } ] }
toml = "0.8" toml = "0.9"
tracing = "0.1" tracing = "0.1"
tracing-subscriber = { version = "0.3", features = [ tracing-subscriber = { version = "0.3", features = [
"parking_lot", "parking_lot",

View File

@@ -6,13 +6,12 @@ pub async fn delete_message(
q: CallbackQuery, q: CallbackQuery,
locale: LocaleRef, locale: LocaleRef,
) -> crate::Result<()> { ) -> crate::Result<()> {
if let Some(msg) = q.message { if let Some(msg) = q.message
if bot.delete_message(msg.chat().id, msg.id()).await.is_err() { && bot.delete_message(msg.chat().id, msg.id()).await.is_err() {
bot.send_message(msg.chat().id, &locale.error_deleting_message) bot.send_message(msg.chat().id, &locale.error_deleting_message)
.reply_markup(deletion_markup(locale)) .reply_markup(deletion_markup(locale))
.await?; .await?;
} }
}
bot.answer_callback_query(q.id).await?; bot.answer_callback_query(q.id).await?;
Ok(()) Ok(())
} }

View File

@@ -46,6 +46,6 @@ async fn notify_about_no_user_info(
} }
/// Gets a handler that filters out the messages without user information /// Gets a handler that filters out the messages without user information
pub fn get_handler() -> Handler<'static, DependencyMap, crate::Result<()>, DpHandlerDescription> { pub fn get_handler() -> Handler<'static, crate::Result<()>, DpHandlerDescription> {
dptree::filter(has_no_user_info).endpoint(notify_about_no_user_info) dptree::filter(has_no_user_info).endpoint(notify_about_no_user_info)
} }

View File

@@ -44,6 +44,6 @@ async fn notify_about_no_master_pass(
} }
/// Gets a handler that filters out the messages of users that don't have a master password set /// Gets a handler that filters out the messages of users that don't have a master password set
pub fn get_handler() -> Handler<'static, DependencyMap, crate::Result<()>, DpHandlerDescription> { pub fn get_handler() -> Handler<'static, crate::Result<()>, DpHandlerDescription> {
dptree::filter_map_async(master_pass_exists).endpoint(notify_about_no_master_pass) dptree::filter_map_async(master_pass_exists).endpoint(notify_about_no_master_pass)
} }

View File

@@ -49,7 +49,7 @@ fn validate_document(document: Option<&Document>) -> Result<&Document, InvalidDo
} }
async fn download_file(bot: &Throttle<Bot>, file: &FileMeta) -> crate::Result<Box<[u8]>> { async fn download_file(bot: &Throttle<Bot>, file: &FileMeta) -> crate::Result<Box<[u8]>> {
let path = bot.get_file(&file.id).await?.path; let path = bot.get_file(file.id.clone()).await?.path;
let mut data = Vec::with_capacity(file.size as usize); let mut data = Vec::with_capacity(file.size as usize);
let mut stream = bot.download_file_stream(&path); let mut stream = bot.download_file_stream(&path);
while let Some(bytes) = stream.try_next().await? { while let Some(bytes) = stream.try_next().await? {