Update to hyper 0.13
This commit is contained in:
committed by
Sean McArthur
parent
db2de90e42
commit
0f32c4a01a
20
src/proxy.rs
20
src/proxy.rs
@@ -5,7 +5,6 @@ use std::sync::Arc;
|
||||
|
||||
use crate::{IntoUrl, Url};
|
||||
use http::{header::HeaderValue, Uri};
|
||||
use hyper::client::connect::Destination;
|
||||
use percent_encoding::percent_decode;
|
||||
use std::collections::HashMap;
|
||||
use std::env;
|
||||
@@ -508,25 +507,10 @@ pub(crate) trait Dst {
|
||||
fn port(&self) -> Option<u16>;
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl Dst for Destination {
|
||||
fn scheme(&self) -> &str {
|
||||
Destination::scheme(self)
|
||||
}
|
||||
|
||||
fn host(&self) -> &str {
|
||||
Destination::host(self)
|
||||
}
|
||||
|
||||
fn port(&self) -> Option<u16> {
|
||||
Destination::port(self)
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
impl Dst for Uri {
|
||||
fn scheme(&self) -> &str {
|
||||
self.scheme_part()
|
||||
self.scheme()
|
||||
.expect("Uri should have a scheme")
|
||||
.as_str()
|
||||
}
|
||||
@@ -536,7 +520,7 @@ impl Dst for Uri {
|
||||
}
|
||||
|
||||
fn port(&self) -> Option<u16> {
|
||||
self.port_part().map(|p| p.as_u16())
|
||||
self.port().map(|p| p.as_u16())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user