From e1a4036d823471f85b0e42da20a98dde7023f4a3 Mon Sep 17 00:00:00 2001 From: Waffle Date: Sat, 7 Sep 2019 21:30:56 +0300 Subject: [PATCH] Implement `Clone` on `ForwardKind`, `ForwardedFrom`, `MediaKind` and `ChatKind` --- src/core/types/chat.rs | 2 +- src/core/types/message.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/types/chat.rs b/src/core/types/chat.rs index 67c1ac35..dd944722 100644 --- a/src/core/types/chat.rs +++ b/src/core/types/chat.rs @@ -11,7 +11,7 @@ pub struct Chat { } -#[derive(Debug, Deserialize, Eq, Hash, PartialEq)] +#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Clone)] #[serde(untagged)] pub enum ChatKind { NonPrivate { diff --git a/src/core/types/message.rs b/src/core/types/message.rs index 5aa83964..3c7d0f78 100644 --- a/src/core/types/message.rs +++ b/src/core/types/message.rs @@ -72,7 +72,7 @@ pub enum MessageKind { }, } -#[derive(Debug, Deserialize, Eq, Hash, PartialEq)] +#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Clone)] #[serde(untagged)] pub enum ForwardKind { ChannelForward { @@ -96,7 +96,7 @@ pub enum ForwardKind { }, } -#[derive(Debug, Deserialize, Eq, Hash, PartialEq)] +#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Clone)] pub enum ForwardedFrom { #[serde(rename = "forward_from")] User(User), @@ -104,7 +104,7 @@ pub enum ForwardedFrom { SenderName(String), } -#[derive(Debug, Deserialize, Eq, Hash, PartialEq)] +#[derive(Debug, Deserialize, Eq, Hash, PartialEq, Clone)] #[serde(untagged)] pub enum MediaKind { Animation {