return result error on main function
This commit is contained in:
parent
13d66bc41a
commit
1ef73af37b
@ -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(())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user