Fix code according to clippy

This commit is contained in:
Сырцев Вадим Игоревич 2024-01-10 13:59:05 +03:00
parent 720c8b2c5f
commit 2ba8bb8d34

View file

@ -1101,10 +1101,7 @@ mod getters {
/// [More on this](https://core.telegram.org/bots/api#message) /// [More on this](https://core.telegram.org/bots/api#message)
#[must_use] #[must_use]
pub fn is_delete_chat_photo(&self) -> bool { pub fn is_delete_chat_photo(&self) -> bool {
match &self.kind { matches!(&self.kind, DeleteChatPhoto(..))
DeleteChatPhoto(..) => true,
_ => false,
}
} }
#[must_use] #[must_use]
@ -1121,10 +1118,7 @@ mod getters {
/// [More on this](https://core.telegram.org/bots/api#message) /// [More on this](https://core.telegram.org/bots/api#message)
#[must_use] #[must_use]
pub fn is_group_chat_created(&self) -> bool { pub fn is_group_chat_created(&self) -> bool {
match &self.kind { matches!(&self.kind, GroupChatCreated(..))
GroupChatCreated(..) => true,
_ => false,
}
} }
#[must_use] #[must_use]
@ -1141,10 +1135,7 @@ mod getters {
/// [More on this](https://core.telegram.org/bots/api#message) /// [More on this](https://core.telegram.org/bots/api#message)
#[must_use] #[must_use]
pub fn is_super_group_chat_created(&self) -> bool { pub fn is_super_group_chat_created(&self) -> bool {
match &self.kind { matches!(&self.kind, SupergroupChatCreated(..))
SupergroupChatCreated(..) => true,
_ => false,
}
} }
#[must_use] #[must_use]
@ -1163,10 +1154,7 @@ mod getters {
/// [More on this](https://core.telegram.org/bots/api#message) /// [More on this](https://core.telegram.org/bots/api#message)
#[must_use] #[must_use]
pub fn is_channel_chat_created(&self) -> bool { pub fn is_channel_chat_created(&self) -> bool {
match &self.kind { matches!(&self.kind, ChannelChatCreated(..))
ChannelChatCreated(..) => true,
_ => false,
}
} }
#[must_use] #[must_use]