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

This commit is contained in:
Keijia authored and Martin Algesten committed 2021-08-23 20:46:44 +02:00
1 parent c7292919e5
commit 2869a80130
1 file changed
+1 -1
+1 -1
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(),