diff --git a/examples/buttons.rs b/examples/buttons.rs index 9fd12298..395925da 100644 --- a/examples/buttons.rs +++ b/examples/buttons.rs @@ -31,9 +31,6 @@ async fn main() -> Result<(), Box> { .branch(Update::filter_inline_query().endpoint(inline_query_handler)); Dispatcher::builder(bot, handler).build().setup_ctrlc_handler().dispatch().await; - - log::info!("Closing bot... Goodbye!"); - Ok(()) } diff --git a/src/dispatching/repls/mod.rs b/src/dispatching/repls/mod.rs index ab1e9f5f..b0f450a3 100644 --- a/src/dispatching/repls/mod.rs +++ b/src/dispatching/repls/mod.rs @@ -4,5 +4,4 @@ mod commands_repl; mod repl; 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}; diff --git a/src/dispatching/repls/repl.rs b/src/dispatching/repls/repl.rs index cbd4fed1..c26714ff 100644 --- a/src/dispatching/repls/repl.rs +++ b/src/dispatching/repls/repl.rs @@ -69,3 +69,12 @@ where ) .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) {} +} diff --git a/src/lib.rs b/src/lib.rs index 2ab0e677..5f2f3173 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -61,7 +61,7 @@ // https://github.com/rust-lang/rust-clippy/issues/7422 #![allow(clippy::nonstandard_macro_braces)] -#[cfg(all(feature = "ctrlc_handler"))] +#[cfg(feature = "ctrlc_handler")] pub use dispatching::repls::{ commands_repl, commands_repl_with_listener, repl, repl_with_listener, };