mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-06 23:15:08 -04:00
Switch from futures-locks to async-lock
This commit is contained in:
@@ -50,7 +50,7 @@ default-features = false
|
||||
features = ["sync", "fs"]
|
||||
|
||||
[dev-dependencies]
|
||||
futures = { version = "0.3.15", default-features = false }
|
||||
futures = { version = "0.3.15", default-features = false, features = ["executor"] }
|
||||
http = "0.2.4"
|
||||
matrix-sdk-test = { version = "0.4.0", path = "../matrix-sdk-test" }
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ version = "0.1.9"
|
||||
features = ["now"]
|
||||
|
||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||
futures-util = { version = "0.3.15", default-features = false }
|
||||
futures-locks = { version = "0.6.0", default-features = false }
|
||||
async-lock = "2.4.0"
|
||||
futures-util = { version = "0.3.15", default-features = false, features = ["channel"] }
|
||||
wasm-bindgen-futures = "0.4.24"
|
||||
uuid = { version = "0.8.2", default-features = false, features = ["v4", "wasm-bindgen"] }
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
// could switch to futures-lock completely at some point, blocker:
|
||||
// https://github.com/asomers/futures-locks/issues/34
|
||||
// https://www.reddit.com/r/rust/comments/f4zldz/i_audited_3_different_implementation_of_async/
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
pub use futures_locks::{Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard};
|
||||
pub use async_lock::{Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard};
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub use tokio::sync::{Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard};
|
||||
|
||||
@@ -56,7 +56,7 @@ criterion = { version = "0.3.4", features = [
|
||||
"async_tokio",
|
||||
"html_reports",
|
||||
] }
|
||||
futures = { version = "0.3.15", default-features = false }
|
||||
futures = { version = "0.3.15", default-features = false, features = ["executor"] }
|
||||
http = "0.2.4"
|
||||
indoc = "1.0.3"
|
||||
matches = "0.1.8"
|
||||
|
||||
@@ -108,7 +108,7 @@ features = ["wasm-bindgen"]
|
||||
[dev-dependencies]
|
||||
anyhow = "1.0"
|
||||
dirs = "3.0.2"
|
||||
futures = { version = "0.3.15", default-features = false }
|
||||
futures = { version = "0.3.15", default-features = false, features = ["executor"] }
|
||||
lazy_static = "1.4.0"
|
||||
matches = "0.1.8"
|
||||
matrix-sdk-test = { version = "0.4.0", path = "../matrix-sdk-test" }
|
||||
|
||||
Reference in New Issue
Block a user