feat(server): Make the server code an optional feature (#2334)
cc #2223 BREAKING CHANGE: The HTTP server code is now an optional feature. To enable the server, add `features = ["server"]` to the dependency in your `Cargo.toml`.
This commit is contained in:
@@ -9,8 +9,10 @@ macro_rules! ready {
|
||||
|
||||
pub(crate) mod buf;
|
||||
#[cfg(any(feature = "http1", feature = "http2"))]
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod date;
|
||||
#[cfg(any(feature = "http1", feature = "http2"))]
|
||||
#[cfg(feature = "server")]
|
||||
pub(crate) mod drain;
|
||||
#[cfg(any(feature = "http1", feature = "http2"))]
|
||||
pub(crate) mod exec;
|
||||
@@ -24,8 +26,6 @@ pub(crate) mod sync_wrapper;
|
||||
pub(crate) mod task;
|
||||
pub(crate) mod watch;
|
||||
|
||||
//#[cfg(any(feature = "http1", feature = "http2"))]
|
||||
//pub(crate) use self::exec::{BoxSendFuture, Exec};
|
||||
#[cfg(any(feature = "http1", feature = "http2"))]
|
||||
#[cfg(feature = "client")]
|
||||
pub(crate) use self::lazy::{lazy, Started as Lazy};
|
||||
@@ -33,6 +33,7 @@ pub use self::never::Never;
|
||||
pub(crate) use self::task::Poll;
|
||||
|
||||
// group up types normally needed for `Future`
|
||||
#[cfg(any(feature = "http1", feature = "http2"))]
|
||||
pub(crate) use std::marker::Unpin;
|
||||
cfg_proto! {
|
||||
pub(crate) use std::marker::Unpin;
|
||||
}
|
||||
pub(crate) use std::{future::Future, pin::Pin};
|
||||
|
||||
Reference in New Issue
Block a user