From d84a852ae95d944e6e22b3c5c1b44be1a7d31702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Mon, 4 Jan 2021 14:06:07 +0100 Subject: [PATCH] matrix-sdk: Bump ruma to a released version. --- matrix_sdk_common/Cargo.toml | 4 +--- matrix_sdk_common/src/lib.rs | 5 +++-- matrix_sdk_crypto/src/store/sqlite.rs | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/matrix_sdk_common/Cargo.toml b/matrix_sdk_common/Cargo.toml index d3c6dcb7..703dbafa 100644 --- a/matrix_sdk_common/Cargo.toml +++ b/matrix_sdk_common/Cargo.toml @@ -19,9 +19,7 @@ instant = { version = "0.1.7", features = ["wasm-bindgen", "now"] } js_int = "0.1.9" [dependencies.ruma] -version = "0.0.1" -git = "https://github.com/ruma/ruma" -rev = "e8882fe8142d7b55ed4c8ccc6150946945f9e237" +version = "0.0.2" features = ["client-api", "unstable-pre-spec"] [target.'cfg(not(target_arch = "wasm32"))'.dependencies] diff --git a/matrix_sdk_common/src/lib.rs b/matrix_sdk_common/src/lib.rs index 13655d0a..c7a83c90 100644 --- a/matrix_sdk_common/src/lib.rs +++ b/matrix_sdk_common/src/lib.rs @@ -1,13 +1,14 @@ pub use assign::assign; pub use instant; -pub use js_int; pub use ruma::{ api::{ client as api, error::{FromHttpRequestError, FromHttpResponseError, IntoHttpError, ServerError}, AuthScheme, EndpointError, OutgoingRequest, }, - directory, encryption, events, identifiers, presence, push, + directory, encryption, events, + events::exports::js_int, + identifiers, presence, push, serde::{CanonicalJsonValue, Raw}, thirdparty, Outgoing, }; diff --git a/matrix_sdk_crypto/src/store/sqlite.rs b/matrix_sdk_crypto/src/store/sqlite.rs index 8b843c49..27d3cb06 100644 --- a/matrix_sdk_crypto/src/store/sqlite.rs +++ b/matrix_sdk_crypto/src/store/sqlite.rs @@ -664,7 +664,7 @@ impl SqliteStore { let claimed_keys: BTreeMap = key_rows .into_iter() .filter_map(|row| { - let algorithm = row.0.parse::().ok()?; + let algorithm = DeviceKeyAlgorithm::try_from(row.0).ok()?; let key = row.1; Some((algorithm, key)) @@ -872,7 +872,7 @@ impl SqliteStore { let keys: BTreeMap = key_rows .into_iter() .filter_map(|row| { - let algorithm = row.0.parse::().ok()?; + let algorithm = DeviceKeyAlgorithm::try_from(row.0).ok()?; let key = row.1; Some((DeviceKeyId::from_parts(algorithm, &device_id), key)) @@ -896,7 +896,7 @@ impl SqliteStore { continue; }; - let key_algorithm = if let Ok(k) = row.1.parse::() { + let key_algorithm = if let Ok(k) = DeviceKeyAlgorithm::try_from(row.1) { k } else { continue;