From af3305cae87c5449d81ffbd1000bf44d6b8ea821 Mon Sep 17 00:00:00 2001 From: LasterAlex Date: Mon, 23 Sep 2024 01:30:28 +0300 Subject: [PATCH] Updated code with suggestions --- crates/teloxide/src/sugar.rs | 2 +- crates/teloxide/src/sugar/bot.rs | 2 +- crates/teloxide/src/sugar/request.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/teloxide/src/sugar.rs b/crates/teloxide/src/sugar.rs index ae5bb627..0e8bb856 100644 --- a/crates/teloxide/src/sugar.rs +++ b/crates/teloxide/src/sugar.rs @@ -1,4 +1,4 @@ -//! Some syntax sugar support for TBA functionality +//! Some syntax sugar support for TBA functionality. pub mod bot; pub mod request; diff --git a/crates/teloxide/src/sugar/bot.rs b/crates/teloxide/src/sugar/bot.rs index 7755cc58..7b62ba66 100644 --- a/crates/teloxide/src/sugar/bot.rs +++ b/crates/teloxide/src/sugar/bot.rs @@ -4,7 +4,7 @@ use crate::{prelude::*, types::*}; use teloxide_core::{payloads::*, requests::JsonRequest}; -/// Adds useful manipulations with [`Message`] structs +/// Syntax sugar for [`Message`] manipulations. /// /// [`Message`]: crate::types::Message pub trait BotMessagesExt { diff --git a/crates/teloxide/src/sugar/request.rs b/crates/teloxide/src/sugar/request.rs index 6c2d4f3d..59ca41b0 100644 --- a/crates/teloxide/src/sugar/request.rs +++ b/crates/teloxide/src/sugar/request.rs @@ -47,7 +47,7 @@ macro_rules! impl_request_link_preview_ext { }; } -/// Adds `.reply_to(message_id)` to requests +/// `.reply_to(msg)` syntax sugar for requests. pub trait RequestReplyExt { /// Replaces `.reply_parameters(ReplyParameters::new(msg.id))` /// with `.reply_to(msg.id)` or `.reply_to(msg)` @@ -57,7 +57,7 @@ pub trait RequestReplyExt { Self: Sized; } -/// Adds `.disable_link_preview(is_disabled)` to requests +/// `.disable_link_preview(is_disabled)` syntax sugar for requests. pub trait RequestLinkPreviewExt { /// Replaces /// `.link_preview_options(LinkPreviewOptions { @@ -68,7 +68,7 @@ pub trait RequestLinkPreviewExt { /// show_above_text: false /// };)` /// - /// With `.disable_link_preview(true)` + /// with `.disable_link_preview(true)`. fn disable_link_preview(self, is_disabled: bool) -> Self where Self: Sized;