return result error on main function

This commit is contained in:
Akulij 2025-03-30 18:04:26 +08:00
parent 13d66bc41a
commit 1ef73af37b

View File

@ -1,7 +1,7 @@
use teloxide::prelude::*; use teloxide::prelude::*;
#[tokio::main] #[tokio::main]
async fn main() { async fn main() -> Result<(), Box<dyn std::error::Error>>{
let bot = Bot::from_env(); let bot = Bot::from_env();
teloxide::repl(bot, |bot: Bot, msg: Message| async move { teloxide::repl(bot, |bot: Bot, msg: Message| async move {
@ -9,4 +9,6 @@ async fn main() {
Ok(()) Ok(())
}) })
.await; .await;
Ok(())
} }