@@ -49,7 +49,7 @@ impl Proxy {
|
||||
/// # fn main() {}
|
||||
/// ```
|
||||
pub fn http<U: IntoUrl>(url: U) -> ::Result<Proxy> {
|
||||
let uri = ::into_url::to_uri(&try_!(url.into_url()));
|
||||
let uri = ::into_url::to_uri(&url.into_url()?);
|
||||
Ok(Proxy::new(Intercept::Http(uri)))
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ impl Proxy {
|
||||
/// # fn main() {}
|
||||
/// ```
|
||||
pub fn https<U: IntoUrl>(url: U) -> ::Result<Proxy> {
|
||||
let uri = ::into_url::to_uri(&try_!(url.into_url()));
|
||||
let uri = ::into_url::to_uri(&url.into_url()?);
|
||||
Ok(Proxy::new(Intercept::Https(uri)))
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ impl Proxy {
|
||||
/// # fn main() {}
|
||||
/// ```
|
||||
pub fn all<U: IntoUrl>(url: U) -> ::Result<Proxy> {
|
||||
let uri = ::into_url::to_uri(&try_!(url.into_url()));
|
||||
let uri = ::into_url::to_uri(&url.into_url()?);
|
||||
Ok(Proxy::new(Intercept::All(uri)))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user