feat(http1): Make HTTP/1 support an optional feature
cc #2251 BREAKING CHANGE: This puts all HTTP/1 methods and support behind an `http1` cargo feature, which will not be enabled by default. To use HTTP/1, add `features = ["http1"]` to the hyper dependency in your `Cargo.toml`.
This commit is contained in:
@@ -8,9 +8,14 @@ macro_rules! ready {
|
||||
}
|
||||
|
||||
pub(crate) mod buf;
|
||||
#[cfg(any(feature = "http1", feature = "http2"))]
|
||||
pub(crate) mod date;
|
||||
#[cfg(any(feature = "http1", feature = "http2"))]
|
||||
pub(crate) mod drain;
|
||||
#[cfg(any(feature = "http1", feature = "http2"))]
|
||||
pub(crate) mod exec;
|
||||
pub(crate) mod io;
|
||||
#[cfg(any(feature = "http1", feature = "http2"))]
|
||||
mod lazy;
|
||||
mod never;
|
||||
#[cfg(feature = "stream")]
|
||||
@@ -18,11 +23,14 @@ pub(crate) mod sync_wrapper;
|
||||
pub(crate) mod task;
|
||||
pub(crate) mod watch;
|
||||
|
||||
pub use self::exec::Executor;
|
||||
#[cfg(any(feature = "http1", feature = "http2"))]
|
||||
pub(crate) use self::exec::{BoxSendFuture, Exec};
|
||||
#[cfg(any(feature = "http1", feature = "http2"))]
|
||||
pub(crate) use self::lazy::{lazy, Started as Lazy};
|
||||
pub use self::never::Never;
|
||||
pub(crate) use self::task::Poll;
|
||||
|
||||
// group up types normally needed for `Future`
|
||||
pub(crate) use std::{future::Future, marker::Unpin, pin::Pin};
|
||||
#[cfg(any(feature = "http1", feature = "http2"))]
|
||||
pub(crate) use std::marker::Unpin;
|
||||
pub(crate) use std::{future::Future, pin::Pin};
|
||||
|
||||
Reference in New Issue
Block a user