From 0682292b91da71650b2952888735eb9081face08 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 18 Oct 2020 02:01:39 +0200 Subject: [PATCH] Upgrade ruma --- matrix_sdk/src/client.rs | 8 +++++--- matrix_sdk_common/Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/matrix_sdk/src/client.rs b/matrix_sdk/src/client.rs index 5b6fc4b5..b667e4a3 100644 --- a/matrix_sdk/src/client.rs +++ b/matrix_sdk/src/client.rs @@ -826,7 +826,7 @@ impl Client { /// let mut client = Client::new(homeserver).unwrap(); /// /// let generic_search_term = Some("matrix-rust-sdk"); - /// let filter = Some(assign!(Filter::new(), { generic_search_term })); + /// let filter = assign!(Filter::new(), { generic_search_term }); /// let request = assign!(PublicRoomsFilterRequest::new(), { filter }); /// /// client.public_rooms_filtered(request).await; @@ -1292,7 +1292,9 @@ impl Client { let mut data = Vec::new(); reader.read_to_end(&mut data)?; - let request = create_content::Request::new(content_type.essence_str(), data); + let request = assign!(create_content::Request::new(data), { + content_type: Some(content_type.essence_str()), + }); self.http_client.upload(request).await } @@ -2325,7 +2327,7 @@ mod test { .create(); let generic_search_term = Some("cheese"); - let filter = Some(assign!(Filter::new(), { generic_search_term })); + let filter = assign!(Filter::new(), { generic_search_term }); let request = assign!(PublicRoomsFilterRequest::new(), { filter }); let get_public_rooms_filtered::Response { chunk, .. } = diff --git a/matrix_sdk_common/Cargo.toml b/matrix_sdk_common/Cargo.toml index 6eb38e5d..252c7807 100644 --- a/matrix_sdk_common/Cargo.toml +++ b/matrix_sdk_common/Cargo.toml @@ -21,7 +21,7 @@ js_int = "0.1.9" [dependencies.ruma] version = "0.0.1" git = "https://github.com/ruma/ruma" -rev = "3869d75837b7aab60eef58fc834e498317d1e4a4" +rev = "50eb700571480d1440e15a387d10f98be8abab59" features = ["client-api", "unstable-pre-spec", "unstable-exhaustive-types"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]