Skip to content

Commit 2adefd2

Browse files
committed
Only enable the tokio features used by this crate
Tokio offers the following features: https://docs.rs/tokio/latest/tokio/#feature-flags This removes the following unused Tokio features from `dependencies`: - `fs`: Since it's only used by examples/tests/doctests: https://github.com/fussybeaver/bollard/search?q=%22tokio%3A%3Afs%22 - `rt` / `rt-multi-thread`: Since it's not used by bollard itself, and should be specified by end-users in their application. By activating `rt-multi-thread` by default, it means anyone not using the multi-thread runtime has to pay the dependency/compile time price for it regardless. And the following from `dev-dependencies`: - `time` / `net`: Since they are already specified in `dependencies`, and it's not necessary to duplicate them in `dev-dependencies` as Cargo will perform feature unification. - `rt`: Since `rt-multi-thread` includes `rt` already. - `io-std`: Since it's not used by any examples/tests and isn't even one of the official top-level features anyway: https://docs.rs/tokio/latest/tokio/#feature-flags Note: The full benefits of this change won't be realised until this `hyperlocal` change is picked up in the next `hyperlocal` release: softprops/hyperlocal#54
1 parent 28f42e1 commit 2adefd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ serde = "1.0"
4444
serde_derive = "1.0"
4545
serde_json = "1.0"
4646
serde_urlencoded = "0.7"
47-
tokio = { version = "1.7", features = ["time", "fs", "net", "rt", "rt-multi-thread", "io-util"] }
47+
tokio = { version = "1.7", features = ["time", "net", "io-util"] }
4848
thiserror = "1.0"
4949
tokio-util = { version = "0.6", features = ["codec"] }
5050
url = "2.2"
@@ -55,7 +55,7 @@ webpki = { version = "0.22", optional = true }
5555
env_logger = "0.9"
5656
flate2 = "1.0"
5757
tar = "0.4"
58-
tokio = { version = "1.7", features = ["time", "fs", "net", "rt", "rt-multi-thread", "macros", "io-std"] }
58+
tokio = { version = "1.7", features = ["fs", "rt-multi-thread", "macros"] }
5959

6060
[target.'cfg(unix)'.dependencies]
6161
hyperlocal = { version = "0.8.0" }

0 commit comments

Comments
 (0)