Merge serde attributes

This commit is contained in:
Jonas Platte 2020-04-28 00:30:23 +02:00
parent d837384e58
commit 037a4faa6e
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -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<RoomAliasId>,
}
}