From 2b23136e2fd6f4997390e36cd4610059a78426e4 Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Sat, 21 Sep 2019 02:05:56 +0600 Subject: [PATCH] CommonMessage -> Common, PinnedMessage -> Pinned --- src/core/types/message.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/types/message.rs b/src/core/types/message.rs index 2252f54f..8caf1fea 100644 --- a/src/core/types/message.rs +++ b/src/core/types/message.rs @@ -16,7 +16,7 @@ pub struct Message { impl Message { fn text(&self) -> Option<&str> { - if let MessageKind::CommonMessage { + if let MessageKind::Common { media_kind: MediaKind::Text { ref text, .. }, .. } = self.kind { @@ -30,7 +30,7 @@ impl Message { #[derive(Debug, Deserialize, PartialEq, Clone)] #[serde(untagged)] pub enum MessageKind { - CommonMessage { + Common { #[serde(flatten)] from: Sender, #[serde(flatten)] @@ -68,8 +68,8 @@ pub enum MessageKind { migrate_to_chat_id: i64, migrate_from_chat_id: i64, }, - PinnedMessage { - pinned_message: Box, + Pinned { + pinned: Box, }, Invoice { invoice: Invoice,