From c99f950310b5e5109a0e1737ddf02b6874678cda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Mon, 11 Jan 2021 09:51:21 +0100 Subject: [PATCH] tokio 1.0: update to new tokio-openssl interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit connect/accept are now happening on pinned SslStreams Signed-off-by: Fabian Grünbichler --- src/server/rest.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/rest.rs b/src/server/rest.rs index 04bdc5f9..c30d1c92 100644 --- a/src/server/rest.rs +++ b/src/server/rest.rs @@ -65,7 +65,7 @@ impl RestServer { } } -impl tower_service::Service<&tokio_openssl::SslStream> for RestServer { +impl tower_service::Service<&Pin>>> for RestServer { type Response = ApiService; type Error = Error; type Future = Pin> + Send>>; @@ -74,7 +74,7 @@ impl tower_service::Service<&tokio_openssl::SslStream> fo Poll::Ready(Ok(())) } - fn call(&mut self, ctx: &tokio_openssl::SslStream) -> Self::Future { + fn call(&mut self, ctx: &Pin>>) -> Self::Future { match ctx.get_ref().peer_addr() { Err(err) => { future::err(format_err!("unable to get peer address - {}", err)).boxed()