Use external hyper-native-tls crate

This commit is contained in:
Steven Fackler
2017-01-08 14:11:48 -08:00
committed by Steven Fackler
parent 68c57f62b6
commit fa4df2037a
4 changed files with 6 additions and 86 deletions

View File

@@ -94,11 +94,13 @@ struct ClientRef {
}
fn new_hyper_client() -> ::Result<::hyper::Client> {
use tls::TlsClient;
use hyper_native_tls::NativeTlsClient;
Ok(::hyper::Client::with_connector(
::hyper::client::Pool::with_connector(
Default::default(),
::hyper::net::HttpsConnector::new(try!(TlsClient::new()))
::hyper::net::HttpsConnector::new(
try!(NativeTlsClient::new()
.map_err(|e| ::hyper::Error::Ssl(Box::new(e)))))
)
))
}