From 037a4faa6e0b380df67d3a277065c562bade00c6 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Tue, 28 Apr 2020 00:30:23 +0200 Subject: [PATCH] Merge serde attributes --- src/room/canonical_alias.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/room/canonical_alias.rs b/src/room/canonical_alias.rs index 26cbc4fa..f8faa1b7 100644 --- a/src/room/canonical_alias.rs +++ b/src/room/canonical_alias.rs @@ -175,8 +175,7 @@ pub(crate) mod raw { /// Rooms with `alias: None` should be treated the same as a room with no canonical alias. // The spec says "A room with an m.room.canonical_alias event with an absent, null, or empty // alias field should be treated the same as a room with no m.room.canonical_alias event." - #[serde(default)] - #[serde(deserialize_with = "empty_string_as_none")] + #[serde(default, deserialize_with = "empty_string_as_none")] pub alias: Option, } }