matrix-sdk: Bump ruma to a released version.

master
Damir Jelić 2021-01-04 14:06:07 +01:00
parent 9245b2a89a
commit d84a852ae9
3 changed files with 7 additions and 8 deletions

View File

@ -19,9 +19,7 @@ instant = { version = "0.1.7", features = ["wasm-bindgen", "now"] }
js_int = "0.1.9" js_int = "0.1.9"
[dependencies.ruma] [dependencies.ruma]
version = "0.0.1" version = "0.0.2"
git = "https://github.com/ruma/ruma"
rev = "e8882fe8142d7b55ed4c8ccc6150946945f9e237"
features = ["client-api", "unstable-pre-spec"] features = ["client-api", "unstable-pre-spec"]
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]

View File

@ -1,13 +1,14 @@
pub use assign::assign; pub use assign::assign;
pub use instant; pub use instant;
pub use js_int;
pub use ruma::{ pub use ruma::{
api::{ api::{
client as api, client as api,
error::{FromHttpRequestError, FromHttpResponseError, IntoHttpError, ServerError}, error::{FromHttpRequestError, FromHttpResponseError, IntoHttpError, ServerError},
AuthScheme, EndpointError, OutgoingRequest, AuthScheme, EndpointError, OutgoingRequest,
}, },
directory, encryption, events, identifiers, presence, push, directory, encryption, events,
events::exports::js_int,
identifiers, presence, push,
serde::{CanonicalJsonValue, Raw}, serde::{CanonicalJsonValue, Raw},
thirdparty, Outgoing, thirdparty, Outgoing,
}; };

View File

@ -664,7 +664,7 @@ impl SqliteStore {
let claimed_keys: BTreeMap<DeviceKeyAlgorithm, String> = key_rows let claimed_keys: BTreeMap<DeviceKeyAlgorithm, String> = key_rows
.into_iter() .into_iter()
.filter_map(|row| { .filter_map(|row| {
let algorithm = row.0.parse::<DeviceKeyAlgorithm>().ok()?; let algorithm = DeviceKeyAlgorithm::try_from(row.0).ok()?;
let key = row.1; let key = row.1;
Some((algorithm, key)) Some((algorithm, key))
@ -872,7 +872,7 @@ impl SqliteStore {
let keys: BTreeMap<DeviceKeyId, String> = key_rows let keys: BTreeMap<DeviceKeyId, String> = key_rows
.into_iter() .into_iter()
.filter_map(|row| { .filter_map(|row| {
let algorithm = row.0.parse::<DeviceKeyAlgorithm>().ok()?; let algorithm = DeviceKeyAlgorithm::try_from(row.0).ok()?;
let key = row.1; let key = row.1;
Some((DeviceKeyId::from_parts(algorithm, &device_id), key)) Some((DeviceKeyId::from_parts(algorithm, &device_id), key))
@ -896,7 +896,7 @@ impl SqliteStore {
continue; continue;
}; };
let key_algorithm = if let Ok(k) = row.1.parse::<DeviceKeyAlgorithm>() { let key_algorithm = if let Ok(k) = DeviceKeyAlgorithm::try_from(row.1) {
k k
} else { } else {
continue; continue;