Skip to content

Commit

Permalink
add feature flags for deref impls of http1 and http2 builders
Browse files Browse the repository at this point in the history
  • Loading branch information
programatik29 committed Feb 15, 2024
1 parent d91a9e5 commit 5adad13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/conn/auto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ impl<E> Http1Builder<'_, E> {
}
}

#[cfg(feature = "http1")]
impl<'a, E> Deref for Http1Builder<'a, E> {
type Target = Builder<E>;

Expand All @@ -610,6 +611,7 @@ impl<'a, E> Deref for Http1Builder<'a, E> {
}
}

#[cfg(feature = "http1")]
impl<'a, E> DerefMut for Http1Builder<'a, E> {
fn deref_mut(&mut self) -> &mut Self::Target {
self.inner
Expand Down Expand Up @@ -744,6 +746,7 @@ impl<E> Http2Builder<'_, E> {
}
}

#[cfg(feature = "http2")]
impl<'a, E> Deref for Http2Builder<'a, E> {
type Target = Builder<E>;

Expand All @@ -752,6 +755,7 @@ impl<'a, E> Deref for Http2Builder<'a, E> {
}
}

#[cfg(feature = "http2")]
impl<'a, E> DerefMut for Http2Builder<'a, E> {
fn deref_mut(&mut self) -> &mut Self::Target {
self.inner
Expand Down

0 comments on commit 5adad13

Please sign in to comment.