You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we introduced the `rustls` feature, we did it like this:
```toml
[features]
proxy = ["hyper-proxy"]
rustls = ["hyper-proxy/rustls", "tokio-rustls", "hyper-rustls"]
tls = ["hyper-proxy/tls", "native-tls", "tokio-tls", "hyper-tls"]
```
A problem is hidden here: enabling an optional dependency's feature
enabled the dependency. Because of this, `hyper-proxy` is already being
downloaded and compiled, even if `proxy` isn't enabled:
```
$ cargo c
…
Checking hyper-proxy v0.6.0
Checking tbot v0.5.1 (…)
```
But to be able to use it, you have to enable the `proxy` feature, which seems
odd. Since cargo doesn't provide a way to enable an optional dependency's
feature without enabling the dependency (at least yet; rust-lang/cargo#3494),
I think that it's better to always provide proxy functionality.
0 commit comments