Replace remaining direct uses of futures with futures_util

Slight downscope which helps combat the antipattern which is the futures glob
crate. While futures_util is still a large crate, it has better defaults and
is smaller by virtue of not pulling the executor.
This commit is contained in:
Luke Parker
2023-12-18 19:45:08 -05:00
parent a4c82632fb
commit 00774c29d7
5 changed files with 5 additions and 5 deletions

View File

@@ -48,11 +48,11 @@ borsh = { version = "1", default-features = false, features = ["std", "derive",
log = { version = "0.4", default-features = false, features = ["std"] }
env_logger = { version = "0.10", default-features = false, features = ["humantime"] }
futures-util = { version = "0.3", default-features = false, features = ["std"] }
tokio = { version = "1", default-features = false, features = ["rt-multi-thread", "sync", "time", "macros"] }
libp2p = { version = "0.52", default-features = false, features = ["tokio", "tcp", "noise", "yamux", "gossipsub", "mdns", "macros"] }
[dev-dependencies]
futures-util = { version = "0.3", default-features = false, features = ["std"] }
tributary = { package = "tributary-chain", path = "./tributary", features = ["tests"] }
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", default-features = false, features = ["std"] }
sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features = false, features = ["std"] }

View File

@@ -13,13 +13,13 @@ use serai_client::primitives::NetworkId;
use serai_db::Db;
use futures_util::StreamExt;
use tokio::{
sync::{Mutex, RwLock, mpsc, broadcast},
time::sleep,
};
use libp2p::{
futures::StreamExt,
identity::Keypair,
PeerId,
tcp::Config as TcpConfig,