From 370b3bcf981edbab93f612055a8d4284b9e73f85 Mon Sep 17 00:00:00 2001 From: nils <48135649+Nilstrieb@users.noreply.github.com> Date: Tue, 7 Mar 2023 17:24:56 +0100 Subject: [PATCH] loop --- hyper/src/server/server.rs | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/hyper/src/server/server.rs b/hyper/src/server/server.rs index aa27c5b..b543ff0 100644 --- a/hyper/src/server/server.rs +++ b/hyper/src/server/server.rs @@ -64,11 +64,10 @@ impl Builder { loop {} } } -pub trait Watcher: Clone { +pub trait Watcher { type Future; } -#[allow(missing_debug_implementations)] -#[derive(Copy, Clone)] + pub(crate) struct NoopWatcher; impl Watcher for NoopWatcher where @@ -76,6 +75,7 @@ where { type Future = (); } + pub(crate) mod new_svc { use super::Watcher; use crate::body::Body; @@ -92,11 +92,6 @@ pub(crate) mod new_svc { future: W::Future, } - impl, E, W: Watcher> NewSvcTask { - pub(super) fn new(_: W) -> Self { - loop {} - } - } impl Future for NewSvcTask where S: HttpService, @@ -109,17 +104,8 @@ pub(crate) mod new_svc { } } } -pin_project! { - #[doc = " A future building a new `Service` to a `Connection`."] #[doc = ""] #[doc = - " Wraps the future returned from `MakeService` into one that returns"] #[doc = - " a `Connection`."] #[must_use = "futures do nothing unless polled"] #[derive(Debug)] - #[cfg_attr(docsrs, doc(cfg(any(feature = "http1", feature = "http2"))))] - pub struct Connecting < F, E = Exec > { - - #[pin] future : F, - protocol : - Http_ < E >, - - } +pub struct Connecting { + future: F, + protocol: Http_, }