Fix clippy nit with tunnel gc
I tested that rust does not run b in a statment like a || b
if a is true for any opt level. This means it's safe for to
use this logic and avoid running a shell out command for every
tunnel when tunnel gc runs.
@@ -498,9 +498,9 @@ impl Handler<TriggerGC> for TunnelManager {
// checker issues, we should consider a method that does modify in place
for (_identity, tunnels) in self.tunnels.iter() {
for tunnel in tunnels.iter() {
- if tunnel.last_contact.elapsed() < msg.tunnel_timeout {
- insert_into_tunnel_list(tunnel, &mut good);
- } else if check_handshake_time(msg.tunnel_handshake_timeout, &tunnel.iface_name) {
+ if tunnel.last_contact.elapsed() < msg.tunnel_timeout
+ || check_handshake_time(msg.tunnel_handshake_timeout, &tunnel.iface_name)
+ {
insert_into_tunnel_list(tunnel, &mut good);
} else {
insert_into_tunnel_list(tunnel, &mut timed_out)
