diff --git a/Cargo.toml b/Cargo.toml index eadde5c4..06c46e3d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ categories = [ [dependencies] hyper = { version = "0.13.3", default-features = false } -hyper-proxy = { version = "0.6", optional = true, default-features = false } +hyper-proxy = { version = "0.6", default-features = false } tokio = { version = "0.2", features = ["time", "rt-core", "tcp"] } serde_json = "1" serde = { version = "1.0.34", features = ["derive"] } @@ -41,7 +41,7 @@ tracing-futures = "0.2" meval = "0.2" [features] -proxy = ["hyper-proxy"] +proxy = [] rustls = ["hyper-proxy/rustls", "tokio-rustls", "hyper-rustls"] tls = ["hyper-proxy/tls", "native-tls", "tokio-tls", "hyper-tls"] default = ["tls"] @@ -80,7 +80,7 @@ required-features = ["tokio/macros"] [[example]] name = "proxy" -required-features = ["tokio/macros", "proxy"] +required-features = ["tokio/macros"] [[example]] name = "sticker_packs" diff --git a/src/connectors.rs b/src/connectors.rs index fe7753de..aec43bcf 100644 --- a/src/connectors.rs +++ b/src/connectors.rs @@ -11,15 +11,12 @@ use hyper_rustls::HttpsConnector; #[cfg(feature = "tls")] use hyper_tls::HttpsConnector; -#[cfg(feature = "proxy")] pub use hyper_proxy as proxy; -#[cfg(feature = "proxy")] use proxy::ProxyConnector; /// The default HTTPS connector. pub type Https = HttpsConnector; -#[cfg(feature = "proxy")] /// The default proxy connector. pub type Proxy = ProxyConnector; @@ -29,7 +26,6 @@ pub fn https() -> Https { HttpsConnector::new() } -#[cfg(feature = "proxy")] /// Constructs a proxy connector. pub fn proxy(proxy: proxy::Proxy) -> Proxy { ProxyConnector::from_proxy(https(), proxy).unwrap_or_else(|error| {