Upgrade dependencies

This commit is contained in:
Jonas Platte
2023-04-24 13:14:34 +02:00
committed by Jonas Platte
parent e15e21a3d7
commit e5f4bbdc47
9 changed files with 670 additions and 522 deletions

1153
Cargo.lock generated
View File

File diff suppressed because it is too large Load Diff

View File

@@ -26,9 +26,9 @@ async-stream = "0.3.3"
async-trait = "0.1.60"
base64 = "0.21.0"
byteorder = "1.4.3"
ctor = "0.1.26"
ctor = "0.2.0"
dashmap = "5.2.0"
eyeball = "0.4.0"
eyeball = "0.6.0"
eyeball-im = "0.2.0"
futures-util = { version = "0.3.26", default-features = false, features = ["alloc"] }
http = "0.2.6"

View File

@@ -1,7 +1,7 @@
use std::time::Duration;
use matrix_sdk_common::deserialized_responses::ShieldState as RustShieldState;
use napi::bindgen_prelude::{BigInt, ToNapiValue};
use napi::bindgen_prelude::{BigInt, FromNapiValue, ToNapiValue};
use napi_derive::*;
use crate::events;

View File

@@ -1,6 +1,6 @@
//! Types related to events.
use napi::bindgen_prelude::ToNapiValue;
use napi::bindgen_prelude::{FromNapiValue, ToNapiValue};
use napi_derive::*;
use ruma::events::room::history_visibility::HistoryVisibility as RumaHistoryVisibility;

View File

@@ -1,7 +1,7 @@
//! Types for [Matrix](https://matrix.org/) identifiers for devices,
//! events, keys, rooms, servers, users and URIs.
use napi::bindgen_prelude::ToNapiValue;
use napi::bindgen_prelude::{FromNapiValue, ToNapiValue};
use napi_derive::*;
use crate::into_err;

View File

@@ -7,7 +7,7 @@ use std::{
sync::Arc,
};
use napi::bindgen_prelude::{within_runtime_if_available, Either7, ToNapiValue};
use napi::bindgen_prelude::{within_runtime_if_available, Either7, FromNapiValue, ToNapiValue};
use napi_derive::*;
use ruma::{serde::Raw, DeviceKeyAlgorithm, OwnedTransactionId, UInt};
use serde_json::{value::RawValue, Value as JsonValue};

View File

@@ -6,7 +6,7 @@ use matrix_sdk_crypto::requests::{
KeysBackupRequest as RumaKeysBackupRequest, KeysQueryRequest as RumaKeysQueryRequest,
RoomMessageRequest as RumaRoomMessageRequest, ToDeviceRequest as RumaToDeviceRequest,
};
use napi::bindgen_prelude::{Either7, ToNapiValue};
use napi::bindgen_prelude::{Either7, FromNapiValue, ToNapiValue};
use napi_derive::*;
use ruma::{
api::client::keys::{

View File

@@ -563,9 +563,10 @@ impl SlidingSyncListInner {
self.set_ranges(&[(0, range_end)]);
// Finally, let's update the list' state.
Observable::update_eq(&mut self.state.write().unwrap(), |state| {
*state = SlidingSyncState::PartiallyLoaded;
});
Observable::set_if_not_eq(
&mut self.state.write().unwrap(),
SlidingSyncState::PartiallyLoaded,
);
}
// Otherwise the current range has reached its maximum, we switched to `FullyLoaded`
// mode.
@@ -580,17 +581,19 @@ impl SlidingSyncListInner {
self.set_ranges(&[(0, range_maximum)]);
// Finally, let's update the list' state.
Observable::update_eq(&mut self.state.write().unwrap(), |state| {
*state = SlidingSyncState::FullyLoaded;
});
Observable::set_if_not_eq(
&mut self.state.write().unwrap(),
SlidingSyncState::FullyLoaded,
);
}
}
SlidingSyncListRequestGeneratorKind::Selective => {
// Selective mode always loads everything.
Observable::update_eq(&mut self.state.write().unwrap(), |state| {
*state = SlidingSyncState::FullyLoaded;
});
Observable::set_if_not_eq(
&mut self.state.write().unwrap(),
SlidingSyncState::FullyLoaded,
);
}
}

View File

@@ -555,7 +555,7 @@ impl SlidingSync {
sync_span.in_scope(|| error!("Session expired {MAXIMUM_SLIDING_SYNC_SESSION_EXPIRATION} times in a row"));
// The session has expired too many times, let's raise an error!
yield Err(error.into());
yield Err(error);
break;
}
@@ -575,7 +575,7 @@ impl SlidingSync {
});
}
yield Err(error.into());
yield Err(error);
continue;
}