From aa2967c65339ae44b15e7fcca3050695366f650a Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 5 Mar 2019 07:41:41 -0800 Subject: [PATCH] fix feature gated code --- actix-connector/src/ssl/openssl.rs | 11 +++++------ actix-server/src/ssl/nativetls.rs | 6 ++---- actix-server/src/ssl/openssl.rs | 6 ++---- actix-server/src/ssl/rustls.rs | 6 ++---- 4 files changed, 11 insertions(+), 18 deletions(-) diff --git a/actix-connector/src/ssl/openssl.rs b/actix-connector/src/ssl/openssl.rs index 3df9cab5..f05b17e5 100644 --- a/actix-connector/src/ssl/openssl.rs +++ b/actix-connector/src/ssl/openssl.rs @@ -26,8 +26,7 @@ impl OpensslConnector { impl OpensslConnector { pub fn service( connector: SslConnector, - ) -> impl Service), Error = HandshakeError> - { + ) -> impl Service<(R, T), Response = (R, SslStream), Error = HandshakeError> { OpensslConnectorService { connector: connector, _t: PhantomData, @@ -44,10 +43,9 @@ impl Clone for OpensslConnector { } } -impl NewService<()> +impl NewService<(R, T), ()> for OpensslConnector { - type Request = (R, T); type Response = (R, SslStream); type Error = HandshakeError; type Service = OpensslConnectorService; @@ -67,8 +65,9 @@ pub struct OpensslConnectorService { _t: PhantomData<(R, T)>, } -impl Service for OpensslConnectorService { - type Request = (R, T); +impl Service<(R, T)> + for OpensslConnectorService +{ type Response = (R, SslStream); type Error = HandshakeError; type Future = ConnectAsyncExt; diff --git a/actix-server/src/ssl/nativetls.rs b/actix-server/src/ssl/nativetls.rs index aef07e7b..c9d02f5a 100644 --- a/actix-server/src/ssl/nativetls.rs +++ b/actix-server/src/ssl/nativetls.rs @@ -36,8 +36,7 @@ impl Clone for NativeTlsAcceptor { } } -impl NewService for NativeTlsAcceptor { - type Request = T; +impl NewService for NativeTlsAcceptor { type Response = TlsStream; type Error = Error; type Service = NativeTlsAcceptorService; @@ -61,8 +60,7 @@ pub struct NativeTlsAcceptorService { conns: Counter, } -impl Service for NativeTlsAcceptorService { - type Request = T; +impl Service for NativeTlsAcceptorService { type Response = TlsStream; type Error = Error; type Future = Accept; diff --git a/actix-server/src/ssl/openssl.rs b/actix-server/src/ssl/openssl.rs index 5826ce1d..3153841b 100644 --- a/actix-server/src/ssl/openssl.rs +++ b/actix-server/src/ssl/openssl.rs @@ -36,8 +36,7 @@ impl Clone for OpensslAcceptor { } } -impl NewService for OpensslAcceptor { - type Request = T; +impl NewService for OpensslAcceptor { type Response = SslStream; type Error = HandshakeError; type Service = OpensslAcceptorService; @@ -61,8 +60,7 @@ pub struct OpensslAcceptorService { conns: Counter, } -impl Service for OpensslAcceptorService { - type Request = T; +impl Service for OpensslAcceptorService { type Response = SslStream; type Error = HandshakeError; type Future = OpensslAcceptorServiceFut; diff --git a/actix-server/src/ssl/rustls.rs b/actix-server/src/ssl/rustls.rs index dd05ede3..5f233269 100644 --- a/actix-server/src/ssl/rustls.rs +++ b/actix-server/src/ssl/rustls.rs @@ -38,8 +38,7 @@ impl Clone for RustlsAcceptor { } } -impl NewService for RustlsAcceptor { - type Request = T; +impl NewService for RustlsAcceptor { type Response = TlsStream; type Error = io::Error; type Service = RustlsAcceptorService; @@ -63,8 +62,7 @@ pub struct RustlsAcceptorService { conns: Counter, } -impl Service for RustlsAcceptorService { - type Request = T; +impl Service for RustlsAcceptorService { type Response = TlsStream; type Error = io::Error; type Future = RustlsAcceptorServiceFut;