mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
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:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -7530,7 +7530,7 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"frame-benchmarking",
|
"frame-benchmarking",
|
||||||
"futures",
|
"futures-util",
|
||||||
"jsonrpsee",
|
"jsonrpsee",
|
||||||
"pallet-transaction-payment-rpc",
|
"pallet-transaction-payment-rpc",
|
||||||
"sc-authority-discovery",
|
"sc-authority-discovery",
|
||||||
|
|||||||
@@ -48,11 +48,11 @@ borsh = { version = "1", default-features = false, features = ["std", "derive",
|
|||||||
log = { version = "0.4", default-features = false, features = ["std"] }
|
log = { version = "0.4", default-features = false, features = ["std"] }
|
||||||
env_logger = { version = "0.10", default-features = false, features = ["humantime"] }
|
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"] }
|
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"] }
|
libp2p = { version = "0.52", default-features = false, features = ["tokio", "tcp", "noise", "yamux", "gossipsub", "mdns", "macros"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
futures-util = { version = "0.3", default-features = false, features = ["std"] }
|
|
||||||
tributary = { package = "tributary-chain", path = "./tributary", features = ["tests"] }
|
tributary = { package = "tributary-chain", path = "./tributary", features = ["tests"] }
|
||||||
sp-application-crypto = { git = "https://github.com/serai-dex/substrate", default-features = false, features = ["std"] }
|
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"] }
|
sp-runtime = { git = "https://github.com/serai-dex/substrate", default-features = false, features = ["std"] }
|
||||||
|
|||||||
@@ -13,13 +13,13 @@ use serai_client::primitives::NetworkId;
|
|||||||
|
|
||||||
use serai_db::Db;
|
use serai_db::Db;
|
||||||
|
|
||||||
|
use futures_util::StreamExt;
|
||||||
use tokio::{
|
use tokio::{
|
||||||
sync::{Mutex, RwLock, mpsc, broadcast},
|
sync::{Mutex, RwLock, mpsc, broadcast},
|
||||||
time::sleep,
|
time::sleep,
|
||||||
};
|
};
|
||||||
|
|
||||||
use libp2p::{
|
use libp2p::{
|
||||||
futures::StreamExt,
|
|
||||||
identity::Keypair,
|
identity::Keypair,
|
||||||
PeerId,
|
PeerId,
|
||||||
tcp::Config as TcpConfig,
|
tcp::Config as TcpConfig,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ name = "serai-node"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
clap = { version = "4", features = ["derive"] }
|
clap = { version = "4", features = ["derive"] }
|
||||||
|
|
||||||
futures = "0.3"
|
futures-util = "0.3"
|
||||||
jsonrpsee = { version = "0.16", features = ["server"] }
|
jsonrpsee = { version = "0.16", features = ["server"] }
|
||||||
|
|
||||||
sp-core = { git = "https://github.com/serai-dex/substrate" }
|
sp-core = { git = "https://github.com/serai-dex/substrate" }
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
use std::{boxed::Box, sync::Arc};
|
use std::{boxed::Box, sync::Arc};
|
||||||
|
|
||||||
use futures::stream::StreamExt;
|
use futures_util::stream::StreamExt;
|
||||||
|
|
||||||
use sp_timestamp::InherentDataProvider as TimestampInherent;
|
use sp_timestamp::InherentDataProvider as TimestampInherent;
|
||||||
use sp_consensus_babe::{SlotDuration, inherents::InherentDataProvider as BabeInherent};
|
use sp_consensus_babe::{SlotDuration, inherents::InherentDataProvider as BabeInherent};
|
||||||
|
|||||||
Reference in New Issue
Block a user