diff --git a/src/handlers/commands/get_accounts.rs b/src/handlers/commands/get_accounts.rs index 12ffef1..bb27924 100644 --- a/src/handlers/commands/get_accounts.rs +++ b/src/handlers/commands/get_accounts.rs @@ -1,6 +1,7 @@ use crate::{entity::prelude::Account, errors::NoUserInfo, handlers::markups::deletion_markup}; use futures::TryStreamExt; use sea_orm::prelude::*; +use std::fmt::Write; use teloxide::{adaptors::Throttle, prelude::*, types::ParseMode}; /// Handles /get_accounts command by sending the list of copyable account names to the user @@ -22,7 +23,7 @@ pub async fn get_accounts( }; account_names .try_for_each(|name| { - result.push_str(&format!("\n`{}`", name)); + write!(result, "\n`{name}`").unwrap(); async { Ok(()) } }) .await?;