From 9fe1b3f19036a42aecfb1b9c73ca8c74a20726cb Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Tue, 28 Apr 2020 14:43:02 +0200 Subject: [PATCH] Update js_int, serde_json --- Cargo.toml | 4 ++-- src/json.rs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 839bb8e3..f3315bf3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,12 +13,12 @@ version = "0.21.0-beta.1" edition = "2018" [dependencies] -js_int = { version = "0.1.4", features = ["serde"] } +js_int = { version = "0.1.5", features = ["serde"] } ruma-events-macros = { path = "ruma-events-macros", version = "=0.21.0-beta.1" } ruma-identifiers = "0.16.0" ruma-serde = "0.1.0" serde = { version = "1.0.106", features = ["derive"] } -serde_json = { version = "1.0.51", features = ["raw_value"] } +serde_json = { version = "1.0.52", features = ["raw_value"] } [dev-dependencies] maplit = "1.0.2" diff --git a/src/json.rs b/src/json.rs index 61e2765f..386df371 100644 --- a/src/json.rs +++ b/src/json.rs @@ -62,8 +62,7 @@ impl EventJson { impl From<&T> for EventJson { fn from(val: &T) -> Self { - let json_string = serde_json::to_string(&val).unwrap(); - Self::new(RawValue::from_string(json_string).unwrap()) + Self::new(serde_json::value::to_raw_value(val).unwrap()) } }