refactor(server): remove more 'static bounds on Server

This commit is contained in:
Sean McArthur
2019-10-24 13:18:07 -07:00
parent 8b878a805a
commit b5e70a0dd1
3 changed files with 4 additions and 8 deletions

View File

@@ -902,7 +902,7 @@ pub(crate) mod spawn_all {
impl<I, S, E> Watcher<I, S, E> for NoopWatcher
where
I: AsyncRead + AsyncWrite + Unpin + Send + 'static,
S: HttpService<Body> + 'static,
S: HttpService<Body>,
<S::ResBody as Payload>::Data: Unpin,
E: H2Exec<S::Future, S::ResBody>,
{
@@ -1017,7 +1017,7 @@ mod upgrades {
impl<I, B, S, E> UpgradeableConnection<I, S, E>
where
S: HttpService<Body, ResBody=B>,// + 'static,
S: HttpService<Body, ResBody=B>,
S::Error: Into<Box<dyn StdError + Send + Sync>>,
I: AsyncRead + AsyncWrite + Unpin,
B: Payload + 'static,
@@ -1035,7 +1035,7 @@ mod upgrades {
impl<I, B, S, E> Future for UpgradeableConnection<I, S, E>
where
S: HttpService<Body, ResBody=B> + 'static,
S: HttpService<Body, ResBody=B>,
S::Error: Into<Box<dyn StdError + Send + Sync>>,
I: AsyncRead + AsyncWrite + Unpin + Send + 'static,
B: Payload + 'static,