From 6ebfe4e03fe0196115c53c26b7a86b3a6fa8db26 Mon Sep 17 00:00:00 2001 From: StNicolay Date: Thu, 20 Jul 2023 23:58:29 +0300 Subject: [PATCH] Replaced try_join func by tokio::try_join to be consistent with delete_all --- src/state/get_user.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/state/get_user.rs b/src/state/get_user.rs index 9ec8405..30de797 100644 --- a/src/state/get_user.rs +++ b/src/state/get_user.rs @@ -1,5 +1,4 @@ use crate::prelude::*; -use futures::future::try_join; use itertools::Itertools; use rustc_hash::FxHashSet; use std::{fmt::Write, path::Path}; @@ -7,7 +6,7 @@ use teloxide::{ net::Download, types::{Document, FileMeta}, }; -use tokio::task::spawn_blocking; +use tokio::{task::spawn_blocking, try_join}; use trim_in_place::TrimInPlace; #[inline] @@ -173,7 +172,7 @@ pub async fn get_user( .map_err(Into::into) }; - let (data, existing_names) = try_join(download_file(&bot, file), existing_names).await?; + let (data, existing_names) = try_join!(download_file(&bot, file), existing_names)?; let user = match spawn_blocking(move || user_from_vec(data, existing_names)).await? { Ok(Ok(user)) => user,