From 5adad132743e0970df21c02c5492bb4b89f710de Mon Sep 17 00:00:00 2001 From: Programatik Date: Thu, 15 Feb 2024 20:27:28 +0300 Subject: [PATCH] add feature flags for deref impls of http1 and http2 builders --- src/server/conn/auto.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server/conn/auto.rs b/src/server/conn/auto.rs index 3bed4e6..d426cad 100644 --- a/src/server/conn/auto.rs +++ b/src/server/conn/auto.rs @@ -602,6 +602,7 @@ impl Http1Builder<'_, E> { } } +#[cfg(feature = "http1")] impl<'a, E> Deref for Http1Builder<'a, E> { type Target = Builder; @@ -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 @@ -744,6 +746,7 @@ impl Http2Builder<'_, E> { } } +#[cfg(feature = "http2")] impl<'a, E> Deref for Http2Builder<'a, E> { type Target = Builder; @@ -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