Downscope usage of futures

This commit is contained in:
Luke Parker
2023-12-10 19:32:43 -05:00
parent 32bea92742
commit 6caf45ea1d
12 changed files with 26 additions and 22 deletions

View File

@@ -45,7 +45,7 @@ frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.8
monero-generators = { path = "generators", version = "0.4", default-features = false }
futures = { version = "0.3", default-features = false, features = ["alloc"], optional = true }
async-lock = { version = "3", default-features = false, optional = true }
hex-literal = "0.4"
hex = { version = "0.4", default-features = false, features = ["alloc"] }
@@ -92,7 +92,7 @@ std = [
"monero-generators/std",
"futures?/std",
"async-lock?/std",
"hex/std",
"serde/std",
@@ -101,7 +101,7 @@ std = [
"base58-monero/std",
]
cache-distribution = ["futures"]
cache-distribution = ["async-lock"]
http-rpc = ["digest_auth", "simple-request", "tokio"]
multisig = ["transcript", "frost", "dleq", "std"]
binaries = ["tokio/rt-multi-thread", "tokio/macros", "http-rpc"]

View File

@@ -6,7 +6,7 @@ use std_shims::sync::OnceLock;
#[cfg(all(feature = "cache-distribution", not(feature = "std")))]
use std_shims::sync::Mutex;
#[cfg(all(feature = "cache-distribution", feature = "std"))]
use futures::lock::Mutex;
use async_lock::Mutex;
use zeroize::{Zeroize, ZeroizeOnDrop};