diff --git a/src/server.rs b/src/server.rs index cd15bef..6f3f6ac 100644 --- a/src/server.rs +++ b/src/server.rs @@ -14,6 +14,7 @@ use boitalettres::server::Server as ImapServer; use std::pin::Pin; use std::task::{Context, Poll}; use tower::Service; +use futures::future::BoxFuture; pub struct Server { pub login_provider: Box, @@ -23,7 +24,7 @@ struct Connection; impl Service for Connection { type Response = Response; type Error = anyhow::Error; - type Future = Pin> + Send>>; + type Future = BoxFuture<'static, Result>; fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { Poll::Ready(Ok(())) @@ -62,7 +63,7 @@ struct Instance; impl<'a> Service<&'a AddrStream> for Instance { type Response = Connection; type Error = anyhow::Error; - type Future = Pin> + Send>>; + type Future = BoxFuture<'static, Result>; fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { Poll::Ready(Ok(()))