Fix the lost stuff

This commit is contained in:
Hirrolot 2022-04-02 20:54:33 +06:00
parent 56c1c55f88
commit 968c988f7f
4 changed files with 10 additions and 5 deletions

View file

@ -31,9 +31,6 @@ async fn main() -> Result<(), Box<dyn Error>> {
.branch(Update::filter_inline_query().endpoint(inline_query_handler)); .branch(Update::filter_inline_query().endpoint(inline_query_handler));
Dispatcher::builder(bot, handler).build().setup_ctrlc_handler().dispatch().await; Dispatcher::builder(bot, handler).build().setup_ctrlc_handler().dispatch().await;
log::info!("Closing bot... Goodbye!");
Ok(()) Ok(())
} }

View file

@ -4,5 +4,4 @@ mod commands_repl;
mod repl; mod repl;
pub use commands_repl::{commands_repl, commands_repl_with_listener}; pub use commands_repl::{commands_repl, commands_repl_with_listener};
//pub use dialogues_repl::{dialogues_repl, dialogues_repl_with_listener};
pub use repl::{repl, repl_with_listener}; pub use repl::{repl, repl_with_listener};

View file

@ -69,3 +69,12 @@ where
) )
.await; .await;
} }
#[test]
fn repl_is_send() {
let bot = crate::Bot::new("");
let repl = crate::repl(bot, |_| async { crate::respond(()) });
assert_send(&repl);
fn assert_send(_: &impl Send) {}
}

View file

@ -61,7 +61,7 @@
// https://github.com/rust-lang/rust-clippy/issues/7422 // https://github.com/rust-lang/rust-clippy/issues/7422
#![allow(clippy::nonstandard_macro_braces)] #![allow(clippy::nonstandard_macro_braces)]
#[cfg(all(feature = "ctrlc_handler"))] #[cfg(feature = "ctrlc_handler")]
pub use dispatching::repls::{ pub use dispatching::repls::{
commands_repl, commands_repl_with_listener, repl, repl_with_listener, commands_repl, commands_repl_with_listener, repl, repl_with_listener,
}; };