Collapse and show the endpoints in the docs

If we remove empty lines between these endpoints, we'll make the code shorter. Additionally, since we do no longer need `AutoSend`, the code is also a bit less convoluted.


Former-commit-id: 94e6f0bd4d
This commit is contained in:
Hirrolot 2022-09-29 09:42:50 +06:00
parent 05501015ee
commit bd78a3bf70

View file

@ -102,10 +102,7 @@
//! -- no problem, reuse [`dptree::Handler::filter`], [`dptree::case!`], and
//! other combinators in the same way!
//!
//! Finally, we define our endpoints via simple `async` functions like this:
//!
//! <details>
//! <summary>Show the endpoints</summary>
//! Finally, we define our endpoints:
//!
//! ```no_run
//! # use teloxide::Bot;
@ -119,23 +116,18 @@
//! async fn start(bot: Bot, msg: Message, dialogue: MyDialogue) -> HandlerResult {
//! todo!()
//! }
//!
//! async fn help(bot: Bot, msg: Message) -> HandlerResult {
//! todo!()
//! }
//!
//! async fn cancel(bot: Bot, msg: Message, dialogue: MyDialogue) -> HandlerResult {
//! todo!()
//! }
//!
//! async fn invalid_state(bot: Bot, msg: Message) -> HandlerResult {
//! todo!()
//! }
//!
//! async fn receive_full_name(bot: Bot, msg: Message, dialogue: MyDialogue) -> HandlerResult {
//! todo!()
//! }
//!
//! async fn receive_product_selection(
//! bot: Bot,
//! q: CallbackQuery,
@ -146,8 +138,6 @@
//! }
//! ```
//!
//! </details>
//!
//! Each parameter is supplied as a dependency by teloxide. In particular:
//! - `bot: Bot` comes from the dispatcher (see below)
//! - `msg: Message` comes from [`Update::filter_message`]