diff --git a/src/common/io/rewind.rs b/src/common/io/rewind.rs index 2307b25958..db28e167c6 100644 --- a/src/common/io/rewind.rs +++ b/src/common/io/rewind.rs @@ -106,6 +106,10 @@ where } } +#[cfg(all( + any(feature = "client", feature = "server"), + any(feature = "http1", feature = "http2"), +))] #[cfg(test)] mod tests { use super::super::Compat; diff --git a/src/upgrade.rs b/src/upgrade.rs index 27fe07ac24..6b7039f076 100644 --- a/src/upgrade.rs +++ b/src/upgrade.rs @@ -345,6 +345,10 @@ mod sealed { } } +#[cfg(all( + any(feature = "client", feature = "server"), + any(feature = "http1", feature = "http2"), +))] #[cfg(test)] mod tests { use super::*;