Fix HighlightTweak deserialization

This commit is contained in:
Jonas Platte 2020-05-01 23:40:26 +02:00
parent 657721b1e6
commit cf2747cc70
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "ruma-common" name = "ruma-common"
version = "0.1.0" version = "0.1.1"
authors = ["Jonas Platte <jplatte@posteo.de>"] authors = ["Jonas Platte <jplatte@posteo.de>"]
description = "Common types for other ruma crates." description = "Common types for other ruma crates."
homepage = "https://github.com/ruma/ruma-common" homepage = "https://github.com/ruma/ruma-common"
@ -11,6 +11,6 @@ repository = "https://github.com/ruma/ruma-client-api"
edition = "2018" edition = "2018"
[dependencies] [dependencies]
ruma-serde = "0.1.2" ruma-serde = "0.1.3"
serde = { version = "1.0.106", features = ["derive"] } serde = { version = "1.0.106", features = ["derive"] }
serde_json = { version = "1.0.52", features = ["raw_value"] } serde_json = { version = "1.0.52", features = ["raw_value"] }

View File

@ -23,6 +23,10 @@ pub struct SoundTweak {
#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
#[serde(tag = "set_tweak", rename = "highlight")] #[serde(tag = "set_tweak", rename = "highlight")]
pub struct HighlightTweak { pub struct HighlightTweak {
#[serde(
default = "ruma_serde::default_true",
skip_serializing_if = "ruma_serde::is_true"
)]
value: bool, value: bool,
} }