diff --git a/src/handlers/utils.rs b/src/handlers/utils.rs index d366ac9..4d9495c 100644 --- a/src/handlers/utils.rs +++ b/src/handlers/utils.rs @@ -1,4 +1,3 @@ -use std::borrow::Borrow; use teloxide::{adaptors::Throttle, prelude::*}; /// Deletes the message ignoring the errors @@ -9,9 +8,8 @@ pub async fn delete_message(bot: Throttle, msg: Message) { /// Deletes the message if there is one ignoring the errors #[inline] -pub async fn delete_optional(bot: &Throttle, msg: Option>) { +pub async fn delete_optional(bot: &Throttle, msg: Option<&Message>) { if let Some(msg) = msg { - let msg: &Message = msg.borrow(); let _ = bot.delete_message(msg.chat.id, msg.id).await; } }