diff --git a/src/cfg.rs b/src/cfg.rs index 1533951b..71a5351d 100644 --- a/src/cfg.rs +++ b/src/cfg.rs @@ -24,24 +24,6 @@ macro_rules! cfg_proto { } cfg_proto! { - macro_rules! cfg_http1 { - ($($item:item)*) => { - cfg_feature! { - #![feature = "http1"] - $($item)* - } - } - } - - macro_rules! cfg_http2 { - ($($item:item)*) => { - cfg_feature! { - #![feature = "http2"] - $($item)* - } - } - } - macro_rules! cfg_client { ($($item:item)*) => { cfg_feature! { diff --git a/src/proto/mod.rs b/src/proto/mod.rs index 513b70f8..f938bf53 100644 --- a/src/proto/mod.rs +++ b/src/proto/mod.rs @@ -1,6 +1,8 @@ //! Pieces pertaining to the HTTP message protocol. -cfg_http1! { +cfg_feature! { + #![feature = "http1"] + pub(crate) mod h1; pub(crate) use self::h1::Conn; @@ -11,9 +13,8 @@ cfg_http1! { pub(crate) use self::h1::ServerTransaction; } -cfg_http2! { - pub(crate) mod h2; -} +#[cfg(feature = "http2")] +pub(crate) mod h2; /// An Incoming Message head. Includes request/status line, and headers. #[derive(Debug, Default)]