Removed unnessesary closure in gen_password.rs

This commit is contained in:
StNicolay 2023-05-14 14:00:57 +03:00
parent e973116df4
commit 2f96d84e34
Signed by: StNicolay
GPG Key ID: 9693D04DCD962B0D

View File

@ -48,7 +48,7 @@ fn generete_passwords() -> ArrayVec<ArrayString<34>, 10> {
/// Handles /gen_password command by generating 10 copyable passwords and sending them to the user
pub async fn gen_password(bot: Throttle<Bot>, msg: Message) -> crate::Result<()> {
let mut message: ArrayString<{ 10 + 35 * 10 }> = "Passwords:".try_into().unwrap();
let passwords = spawn_blocking(|| generete_passwords()).await?;
let passwords = spawn_blocking(generete_passwords).await?;
for password in passwords {
message.push('\n');
message.push_str(&password)