Updated code with suggestions

This commit is contained in:
LasterAlex 2024-09-23 01:30:28 +03:00
parent 2c21479aec
commit af3305cae8
No known key found for this signature in database
3 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,4 @@
//! Some syntax sugar support for TBA functionality //! Some syntax sugar support for TBA functionality.
pub mod bot; pub mod bot;
pub mod request; pub mod request;

View file

@ -4,7 +4,7 @@
use crate::{prelude::*, types::*}; use crate::{prelude::*, types::*};
use teloxide_core::{payloads::*, requests::JsonRequest}; use teloxide_core::{payloads::*, requests::JsonRequest};
/// Adds useful manipulations with [`Message`] structs /// Syntax sugar for [`Message`] manipulations.
/// ///
/// [`Message`]: crate::types::Message /// [`Message`]: crate::types::Message
pub trait BotMessagesExt { pub trait BotMessagesExt {

View file

@ -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 { pub trait RequestReplyExt {
/// Replaces `.reply_parameters(ReplyParameters::new(msg.id))` /// Replaces `.reply_parameters(ReplyParameters::new(msg.id))`
/// with `.reply_to(msg.id)` or `.reply_to(msg)` /// with `.reply_to(msg.id)` or `.reply_to(msg)`
@ -57,7 +57,7 @@ pub trait RequestReplyExt {
Self: Sized; Self: Sized;
} }
/// Adds `.disable_link_preview(is_disabled)` to requests /// `.disable_link_preview(is_disabled)` syntax sugar for requests.
pub trait RequestLinkPreviewExt { pub trait RequestLinkPreviewExt {
/// Replaces /// Replaces
/// `.link_preview_options(LinkPreviewOptions { /// `.link_preview_options(LinkPreviewOptions {
@ -68,7 +68,7 @@ pub trait RequestLinkPreviewExt {
/// show_above_text: false /// show_above_text: false
/// };)` /// };)`
/// ///
/// With `.disable_link_preview(true)` /// with `.disable_link_preview(true)`.
fn disable_link_preview(self, is_disabled: bool) -> Self fn disable_link_preview(self, is_disabled: bool) -> Self
where where
Self: Sized; Self: Sized;