From 32145cf6c31a9d149041b0894029190e3c4086ba Mon Sep 17 00:00:00 2001 From: jeizsm Date: Thu, 11 Oct 2018 11:05:07 +0300 Subject: [PATCH] fix after update tokio-rustls (#542) --- CHANGES.md | 6 ++++++ src/client/connector.rs | 16 +++++----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 39b97cc0b..ad5ae9e1b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Changes +## [0.7.13] - 2018-10-* + +### Fixed + +* Fixed rustls build + ## [0.7.12] - 2018-10-10 ### Changed diff --git a/src/client/connector.rs b/src/client/connector.rs index 07c7b646d..3f4ac27cb 100644 --- a/src/client/connector.rs +++ b/src/client/connector.rs @@ -37,15 +37,9 @@ use { ))] use { rustls::ClientConfig, std::io::Error as SslError, std::sync::Arc, - tokio_rustls::ClientConfigExt, webpki::DNSNameRef, webpki_roots, + tokio_rustls::TlsConnector as SslConnector, webpki::DNSNameRef, webpki_roots, }; -#[cfg(all( - feature = "rust-tls", - not(any(feature = "alpn", feature = "tls", feature = "ssl")) -))] -type SslConnector = Arc; - #[cfg(not(any( feature = "alpn", feature = "ssl", @@ -282,7 +276,7 @@ impl Default for ClientConnector { config .root_store .add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS); - Arc::new(config) + SslConnector::from(Arc::new(config)) } #[cfg_attr(rustfmt, rustfmt_skip)] @@ -373,7 +367,7 @@ impl ClientConnector { /// config /// .root_store /// .add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS); - /// let conn = ClientConnector::with_connector(Arc::new(config)).start(); + /// let conn = ClientConnector::with_connector(config).start(); /// /// conn.send( /// Connect::new("https://www.rust-lang.org").unwrap()) // <- connect to host @@ -390,7 +384,7 @@ impl ClientConnector { /// ``` pub fn with_connector(connector: ClientConfig) -> ClientConnector { // keep level of indirection for docstrings matching featureflags - Self::with_connector_impl(Arc::new(connector)) + Self::with_connector_impl(SslConnector::from(Arc::new(connector))) } #[cfg(all( @@ -832,7 +826,7 @@ impl ClientConnector { let host = DNSNameRef::try_from_ascii_str(&key.host).unwrap(); fut::Either::A( act.connector - .connect_async(host, stream) + .connect(host, stream) .into_actor(act) .then(move |res, _, _| { match res {