matrix-sdk: Update our deps and re-implement PartialEq for the ClientState.
parent
addb455d16
commit
60cc939fdd
|
@ -23,39 +23,39 @@ http = "0.2.1"
|
||||||
url = "2.1.1"
|
url = "2.1.1"
|
||||||
async-trait = "0.1.30"
|
async-trait = "0.1.30"
|
||||||
serde = "1.0.106"
|
serde = "1.0.106"
|
||||||
serde_json = "1.0.51"
|
serde_json = "1.0.52"
|
||||||
uuid = { version = "0.8.1", features = ["v4"] }
|
uuid = { version = "0.8.1", features = ["v4"] }
|
||||||
|
|
||||||
matrix-sdk-types = { path = "../matrix_sdk_types" }
|
matrix-sdk-types = { path = "../matrix_sdk_types" }
|
||||||
matrix-sdk-crypto = { path = "../matrix_sdk_crypto", optional = true }
|
matrix-sdk-crypto = { path = "../matrix_sdk_crypto", optional = true }
|
||||||
|
|
||||||
# Misc dependencies
|
# Misc dependencies
|
||||||
thiserror = "1.0.14"
|
thiserror = "1.0.16"
|
||||||
tracing = "0.1.13"
|
tracing = "0.1.13"
|
||||||
atomic = "0.4.5"
|
atomic = "0.4.5"
|
||||||
dashmap = "3.10.0"
|
dashmap = "3.11.1"
|
||||||
|
|
||||||
[dependencies.tracing-futures]
|
[dependencies.tracing-futures]
|
||||||
version = "0.2.3"
|
version = "0.2.4"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["std", "std-future"]
|
features = ["std", "std-future"]
|
||||||
|
|
||||||
[dependencies.tokio]
|
[dependencies.tokio]
|
||||||
version = "0.2.16"
|
version = "0.2.20"
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["sync", "time", "fs"]
|
features = ["sync", "time", "fs"]
|
||||||
|
|
||||||
[dependencies.sqlx]
|
[dependencies.sqlx]
|
||||||
version = "0.3.3"
|
version = "0.3.4"
|
||||||
optional = true
|
optional = true
|
||||||
default-features = false
|
default-features = false
|
||||||
features = ["runtime-tokio", "sqlite"]
|
features = ["runtime-tokio", "sqlite"]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tokio = { version = "0.2.16", features = ["rt-threaded", "macros"] }
|
tokio = { version = "0.2.20", features = ["rt-threaded", "macros"] }
|
||||||
ruma-identifiers = { version = "0.16.0", features = ["rand"] }
|
ruma-identifiers = { version = "0.16.1", features = ["rand"] }
|
||||||
serde_json = "1.0.51"
|
serde_json = "1.0.52"
|
||||||
tracing-subscriber = "0.2.4"
|
tracing-subscriber = "0.2.5"
|
||||||
tempfile = "3.1.0"
|
tempfile = "3.1.0"
|
||||||
mockito = "0.25.1"
|
mockito = "0.25.1"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
|
|
|
@ -31,7 +31,7 @@ use crate::{Result, Room, Session};
|
||||||
/// When implementing `StateStore` for something other than the filesystem
|
/// When implementing `StateStore` for something other than the filesystem
|
||||||
/// implement `From<ClientState> for YourDbType` this allows for easy conversion
|
/// implement `From<ClientState> for YourDbType` this allows for easy conversion
|
||||||
/// when needed in `StateStore::load/store_client_state`
|
/// when needed in `StateStore::load/store_client_state`
|
||||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||||
pub struct ClientState {
|
pub struct ClientState {
|
||||||
/// The current sync token that should be used for the next sync call.
|
/// The current sync token that should be used for the next sync call.
|
||||||
pub sync_token: Option<Token>,
|
pub sync_token: Option<Token>,
|
||||||
|
@ -41,6 +41,12 @@ pub struct ClientState {
|
||||||
pub push_ruleset: Option<Ruleset>,
|
pub push_ruleset: Option<Ruleset>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl PartialEq for ClientState {
|
||||||
|
fn eq(&self, other: &Self) -> bool {
|
||||||
|
self.sync_token == other.sync_token && self.ignored_users == other.ignored_users
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl ClientState {
|
impl ClientState {
|
||||||
pub fn from_base_client(client: &BaseClient) -> ClientState {
|
pub fn from_base_client(client: &BaseClient) -> ClientState {
|
||||||
let BaseClient {
|
let BaseClient {
|
||||||
|
|
|
@ -12,7 +12,7 @@ version = "0.1.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
js_int = "0.1.5"
|
js_int = "0.1.5"
|
||||||
ruma-api = "0.16.0-rc.2"
|
ruma-api = "0.16.0-rc.3"
|
||||||
ruma-client-api = { version = "0.8.0-rc.5" }
|
ruma-client-api = "0.8.0-rc.5"
|
||||||
ruma-events = { version = "0.21.0-beta.1" }
|
ruma-events = "0.21.0"
|
||||||
ruma-identifiers = "0.16.0"
|
ruma-identifiers = "0.16.1"
|
||||||
|
|
Loading…
Reference in New Issue