diff --git a/hyper/src/common/exec.rs b/hyper/src/common/exec.rs index 799f29a..0f8da10 100644 --- a/hyper/src/common/exec.rs +++ b/hyper/src/common/exec.rs @@ -16,7 +16,7 @@ pub trait ConnStreamExec: Clone { fn execute_h2stream(&mut self); } #[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))] -pub trait NewSvcExec>: Clone { +pub trait NewSvcExec>: Clone { fn execute_new_svc(&mut self, fut: NewSvcTask); } @@ -46,7 +46,7 @@ where impl NewSvcExec for Exec where NewSvcTask: Future + Send + 'static, - W: Watcher, + W: Watcher, { fn execute_new_svc(&mut self, fut: NewSvcTask) { loop {} diff --git a/hyper/src/server/server.rs b/hyper/src/server/server.rs index b543ff0..396e001 100644 --- a/hyper/src/server/server.rs +++ b/hyper/src/server/server.rs @@ -64,12 +64,12 @@ impl Builder { loop {} } } -pub trait Watcher { +pub trait Watcher { type Future; } pub(crate) struct NoopWatcher; -impl Watcher for NoopWatcher +impl Watcher for NoopWatcher where S: HttpService, { @@ -83,11 +83,11 @@ pub(crate) mod new_svc { use crate::common::{task, Future, Pin, Poll}; use crate::service::HttpService; - pub struct NewSvcTask> { + pub struct NewSvcTask> { state: State, } - pub(super) struct State> { + pub(super) struct State> { a: (I, S, E), future: W::Future, } @@ -96,7 +96,7 @@ pub(crate) mod new_svc { where S: HttpService, E: ConnStreamExec, - W: Watcher, + W: Watcher, { type Output = (); fn poll(self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll {