refactor(lib): Inline cfg_http1, cfg_http2 macros
This commit is contained in:
committed by
Sean McArthur
parent
a81c44f2c8
commit
07f9208714
18
src/cfg.rs
18
src/cfg.rs
@@ -24,24 +24,6 @@ macro_rules! cfg_proto {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 {
|
macro_rules! cfg_client {
|
||||||
($($item:item)*) => {
|
($($item:item)*) => {
|
||||||
cfg_feature! {
|
cfg_feature! {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
//! Pieces pertaining to the HTTP message protocol.
|
//! Pieces pertaining to the HTTP message protocol.
|
||||||
|
|
||||||
cfg_http1! {
|
cfg_feature! {
|
||||||
|
#![feature = "http1"]
|
||||||
|
|
||||||
pub(crate) mod h1;
|
pub(crate) mod h1;
|
||||||
|
|
||||||
pub(crate) use self::h1::Conn;
|
pub(crate) use self::h1::Conn;
|
||||||
@@ -11,9 +13,8 @@ cfg_http1! {
|
|||||||
pub(crate) use self::h1::ServerTransaction;
|
pub(crate) use self::h1::ServerTransaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg_http2! {
|
#[cfg(feature = "http2")]
|
||||||
pub(crate) mod h2;
|
pub(crate) mod h2;
|
||||||
}
|
|
||||||
|
|
||||||
/// An Incoming Message head. Includes request/status line, and headers.
|
/// An Incoming Message head. Includes request/status line, and headers.
|
||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
|
|||||||
Reference in New Issue
Block a user