feat(client,server): remove tcp feature and code (#2929)
This removes the `tcp` feature from hyper's `Cargo.toml`, and the code it enabled: - `HttpConnector` - `GaiResolver` - `AddrStream` And parts of `Client` and `Server` that used those types. Alternatives will be available in the `hyper-util` crate. Closes #2856 Co-authored-by: MrGunflame <mrgunflame@protonmail.com>
This commit is contained in:
@@ -55,42 +55,19 @@
|
||||
//! # }
|
||||
//! ```
|
||||
//!
|
||||
//! It's worth noting that for `TcpStream`s, the [`HttpConnector`][] is a
|
||||
//! better starting place to extend from.
|
||||
//!
|
||||
//! Using either of the above connector examples, it can be used with the
|
||||
//! `Client` like this:
|
||||
//!
|
||||
//! ```
|
||||
//! # #[cfg(feature = "runtime")]
|
||||
//! # fn rt () {
|
||||
//! # let connector = hyper::client::HttpConnector::new();
|
||||
//! // let connector = ...
|
||||
//!
|
||||
//! let client = hyper::Client::builder()
|
||||
//! .build::<_, hyper::Body>(connector);
|
||||
//! # }
|
||||
//! ```
|
||||
//!
|
||||
//!
|
||||
//! [`HttpConnector`]: HttpConnector
|
||||
//! [`Service`]: crate::service::Service
|
||||
//! [`Uri`]: ::http::Uri
|
||||
//! [`AsyncRead`]: tokio::io::AsyncRead
|
||||
//! [`AsyncWrite`]: tokio::io::AsyncWrite
|
||||
//! [`Connection`]: Connection
|
||||
//! [`Service`]: crate::service::Service
|
||||
use std::fmt;
|
||||
|
||||
use ::http::Extensions;
|
||||
|
||||
cfg_feature! {
|
||||
#![feature = "tcp"]
|
||||
pub use self::http::{HttpConnector, HttpInfo};
|
||||
|
||||
pub use self::http::{HttpConnector, HttpInfo};
|
||||
|
||||
pub mod dns;
|
||||
mod http;
|
||||
}
|
||||
pub mod dns;
|
||||
mod http;
|
||||
|
||||
cfg_feature! {
|
||||
#![any(feature = "http1", feature = "http2")]
|
||||
|
||||
Reference in New Issue
Block a user