oh, use None != proto instead of proto.is_some()
This commit is contained in:
@@ -412,7 +412,7 @@ pub(crate) fn connect_host(unit: &Unit, hostname: &str, port: u16) -> Result<Tcp
|
|||||||
debug!("connecting to {} at {}", netloc, &sock_addr);
|
debug!("connecting to {} at {}", netloc, &sock_addr);
|
||||||
|
|
||||||
// connect with a configured timeout.
|
// connect with a configured timeout.
|
||||||
let stream = if proto.is_some() && Some(Proto::HTTPConnect) != proto {
|
let stream = if None != proto && Some(Proto::HTTPConnect) != proto {
|
||||||
connect_socks(
|
connect_socks(
|
||||||
unit,
|
unit,
|
||||||
proxy.clone().unwrap(),
|
proxy.clone().unwrap(),
|
||||||
|
|||||||
Reference in New Issue
Block a user