From 22ef2fb7448ddb95be4e1fd982f6446aaecc3708 Mon Sep 17 00:00:00 2001 From: tottoto Date: Fri, 20 Oct 2023 00:11:28 +0900 Subject: [PATCH] refactor(common): remove unused H2Stream stub (#3351) --- 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(