From 4e2265a217d4d74f446a223e67510ba36ba88878 Mon Sep 17 00:00:00 2001 From: Hirrolot Date: Sun, 24 Jul 2022 19:03:37 +0600 Subject: [PATCH 1/2] Hide the definitions of endpoints in the doc Makes scrolling a bit easier. --- src/dispatching.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/dispatching.rs b/src/dispatching.rs index e0440705..3be7897a 100644 --- a/src/dispatching.rs +++ b/src/dispatching.rs @@ -104,6 +104,9 @@ //! //! Finally, we define our endpoints like this: //! +//!
+//! Show the endpoints +//! //! ```no_run //! # use teloxide::{Bot, adaptors::AutoSend}; //! # use teloxide::types::{Message, CallbackQuery}; @@ -147,6 +150,8 @@ //! } //! ``` //! +//!
+//! //! Each parameter is supplied as a dependency by teloxide. In particular: //! - `bot: AutoSend` comes from the dispatcher (see below); //! - `msg: Message` comes from [`Update::filter_message`]; From 8eaadf8f940cb17f11a7cf9b95d3c69bd8266ee9 Mon Sep 17 00:00:00 2001 From: Hirrolot Date: Sun, 24 Jul 2022 19:30:41 +0600 Subject: [PATCH 2/2] Expand a doc sentence according to code review --- src/dispatching.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dispatching.rs b/src/dispatching.rs index 3be7897a..c0418a18 100644 --- a/src/dispatching.rs +++ b/src/dispatching.rs @@ -102,7 +102,7 @@ //! -- no problem, reuse [`dptree::Handler::filter`], [`dptree::case!`], and //! other combinators in the same way! //! -//! Finally, we define our endpoints like this: +//! Finally, we define our endpoints via simple `async` functions like this: //! //!
//! Show the endpoints