Fix serialization error due to url not supporting serde 1.x.

This commit is contained in:
Jimmy Cuadra 2019-06-02 18:00:23 -07:00
parent 95aea3b401
commit 21c2288d51
2 changed files with 7 additions and 1 deletions

View File

@ -22,8 +22,12 @@ ruma-identifiers = "0.12.0"
ruma-signatures = "0.4.2"
serde_json = "1.0.39"
serde_urlencoded = "0.5.4"
url = "1.7.2"
url_serde = "0.2.0"
[dependencies.serde]
version = "1.0.90"
features = ["derive"]
[dependencies.url]
version = "1.7.2"
features = ["serde"]

View File

@ -8,6 +8,7 @@ use url::Url;
#[derive(Clone, Debug, Deserialize, Hash, PartialEq, PartialOrd, Serialize)]
pub struct HomeserverInfo {
/// The base URL for the homeserver for client-server connections.
#[serde(with = "url_serde")]
pub base_url: Url,
}
@ -15,6 +16,7 @@ pub struct HomeserverInfo {
#[derive(Clone, Debug, Deserialize, Hash, PartialEq, PartialOrd, Serialize)]
pub struct IdentityServerInfo {
/// The base URL for the identity server for client-server connections.
#[serde(with = "url_serde")]
pub base_url: Url,
}