refactor(lib): Inline cfg_http1, cfg_http2 macros

This commit is contained in:
Jonas Platte
2021-08-29 14:48:37 +02:00
committed by Sean McArthur
parent a81c44f2c8
commit 07f9208714
2 changed files with 5 additions and 22 deletions

View File

@@ -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! {

View File

@@ -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)]