feat(client): remove Destination for http::Uri in connectors

BREAKING CHANGE: All usage of `hyper::client::connect::Destination`
  should be replaced with `http::Uri`.
This commit is contained in:
Sean McArthur
2019-12-04 12:49:44 -08:00
parent 9645a125e6
commit 319e8aee15
6 changed files with 40 additions and 430 deletions

View File

@@ -71,7 +71,7 @@ use http::uri::Scheme;
use crate::body::{Body, Payload};
use crate::common::{lazy as hyper_lazy, BoxSendFuture, Executor, Lazy, Future, Pin, Poll, task};
use self::connect::{Alpn, sealed::Connect, Connected, Destination};
use self::connect::{Alpn, sealed::Connect, Connected};
use self::pool::{Key as PoolKey, Pool, Poolable, Pooled, Reservation};
#[cfg(feature = "tcp")] pub use self::connect::HttpConnector;
@@ -462,9 +462,7 @@ where C: Connect + Clone + Send + Sync + 'static,
let ver = self.config.ver;
let is_ver_h2 = ver == Ver::Http2;
let connector = self.connector.clone();
let dst = Destination {
uri,
};
let dst = uri;
hyper_lazy(move || {
// Try to take a "connecting lock".
//