Updated /get_accounts to use a write! macro to concatenate the accounts
This commit is contained in:
parent
a0920ba3d3
commit
ee815e5f61
@ -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?;
|
||||
|
Loading…
Reference in New Issue
Block a user