From 0bfebb1d456784acbcc7cc46ff850f687be784b9 Mon Sep 17 00:00:00 2001 From: tottoto Date: Wed, 18 Oct 2023 21:41:23 +0900 Subject: [PATCH] refactor(common): remove unused H2Stream stub --- src/common/exec.rs | 27 --------------------------- src/common/mod.rs | 2 -- 2 files changed, 29 deletions(-) delete mode 100644 src/common/exec.rs diff --git a/src/common/exec.rs b/src/common/exec.rs deleted file mode 100644 index 69d19e9bb7..0000000000 --- a/src/common/exec.rs +++ /dev/null @@ -1,27 +0,0 @@ -use std::future::Future; -use std::pin::Pin; - -// If http2 is not enable, we just have a stub here, so that the trait bounds -// that *would* have been needed are still checked. Why? -// -// Because enabling `http2` shouldn't suddenly add new trait bounds that cause -// a compilation error. - -pub struct H2Stream(std::marker::PhantomData<(F, B)>); - -impl Future for H2Stream -where - F: Future, E>>, - B: crate::body::Body, - B::Error: Into>, - E: Into>, -{ - type Output = (); - - fn poll( - self: Pin<&mut Self>, - _cx: &mut std::task::Context<'_>, - ) -> std::task::Poll { - unreachable!() - } -} diff --git a/src/common/mod.rs b/src/common/mod.rs index 655e9189b6..4129673cdc 100644 --- a/src/common/mod.rs +++ b/src/common/mod.rs @@ -11,8 +11,6 @@ macro_rules! ready { pub(crate) mod buf; #[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))] pub(crate) mod date; -#[cfg(not(feature = "http2"))] -pub(crate) mod exec; pub(crate) mod io; pub(crate) mod task; #[cfg(any(