From 341ef980d14e0ed36cb644cbc4e972fcc72a42c4 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 11 Jul 2024 06:30:41 +0200 Subject: [PATCH] Lint: remove unnecessary `.to_string()` call --- src/telegram/commands/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/telegram/commands/mod.rs b/src/telegram/commands/mod.rs index b0a8347c..e98ccd66 100644 --- a/src/telegram/commands/mod.rs +++ b/src/telegram/commands/mod.rs @@ -73,7 +73,7 @@ async fn handle_command(bot: Bot, command: Command, message: Message) -> Command async fn error_command(bot: &Bot, chat_id: ChatId, message_id: MessageId, error: &Error) -> CommandResult { log::debug!("Command message {message_id:?} in {chat_id:?} errored out with `{error}`"); - let text = format!("⚠️ {}", error.to_string()); + let text = format!("⚠️ {error}"); let _reply = bot .send_message(chat_id, text)