oh, use None != proto instead of proto.is_some()

This commit is contained in:
Keijia
2021-08-20 17:04:42 +03:00
committed by Martin Algesten
parent c7292919e5
commit 2869a80130

View File

@@ -412,7 +412,7 @@ pub(crate) fn connect_host(unit: &Unit, hostname: &str, port: u16) -> Result<Tcp
debug!("connecting to {} at {}", netloc, &sock_addr);
// 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(
unit,
proxy.clone().unwrap(),