From f758a93d70ca483277932031a541b6fa329c82cc Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Fri, 1 May 2020 12:38:48 +0200 Subject: [PATCH] Update serde attrs in room --- src/room.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/room.rs b/src/room.rs index 88e87909..cb93f35a 100644 --- a/src/room.rs +++ b/src/room.rs @@ -31,13 +31,11 @@ pub mod topic; #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] pub struct ImageInfo { /// The height of the image in pixels. - #[serde(rename = "h")] - #[serde(skip_serializing_if = "Option::is_none")] + #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub height: Option, /// The width of the image in pixels. - #[serde(rename = "w")] - #[serde(skip_serializing_if = "Option::is_none")] + #[serde(rename = "w", skip_serializing_if = "Option::is_none")] pub width: Option, /// The MIME type of the image, e.g. "image/png." @@ -65,13 +63,11 @@ pub struct ImageInfo { #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] pub struct ThumbnailInfo { /// The height of the thumbnail in pixels. - #[serde(rename = "h")] - #[serde(skip_serializing_if = "Option::is_none")] + #[serde(rename = "h", skip_serializing_if = "Option::is_none")] pub height: Option, /// The width of the thumbnail in pixels. - #[serde(rename = "w")] - #[serde(skip_serializing_if = "Option::is_none")] + #[serde(rename = "w", skip_serializing_if = "Option::is_none")] pub width: Option, /// The MIME type of the thumbnail, e.g. "image/png."