From b418ce036cd89530c48d48e93465f903f74826c4 Mon Sep 17 00:00:00 2001 From: Mahmoud Mazouz Date: Tue, 27 Feb 2024 12:12:10 +0100 Subject: [PATCH] chore: Apply Clippy lints from Rust 1.76 (default features) --- plugins/zenoh-backend-traits/src/config.rs | 4 ++-- zenoh/src/net/routing/hat/linkstate_peer/network.rs | 4 ++-- zenoh/src/net/routing/hat/p2p_peer/gossip.rs | 4 ++-- zenoh/src/net/routing/hat/router/network.rs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/zenoh-backend-traits/src/config.rs b/plugins/zenoh-backend-traits/src/config.rs index e3fe484e5d..d3ddbd43cc 100644 --- a/plugins/zenoh-backend-traits/src/config.rs +++ b/plugins/zenoh-backend-traits/src/config.rs @@ -201,8 +201,8 @@ impl + AsRef, V: AsObject> TryFrom<(S, &V)> for PluginConfi rest: value .into_iter() .filter(|&(k, _v)| { - (!["__required__", "backend_search_dirs", "volumes", "storages"] - .contains(&k.as_str())) + !["__required__", "backend_search_dirs", "volumes", "storages"] + .contains(&k.as_str()) }) .map(|(k, v)| (k.clone(), v.clone())) .collect(), diff --git a/zenoh/src/net/routing/hat/linkstate_peer/network.rs b/zenoh/src/net/routing/hat/linkstate_peer/network.rs index 77bef7706d..ecd535eb86 100644 --- a/zenoh/src/net/routing/hat/linkstate_peer/network.rs +++ b/zenoh/src/net/routing/hat/linkstate_peer/network.rs @@ -774,12 +774,12 @@ impl Network { .graph .node_indices() .filter(|&idx| { - (self.full_linkstate + self.full_linkstate || self.gossip_multihop || self.links.values().any(|link| link.zid == zid) || (self.router_peers_failover_brokering && idx == self.idx - && whatami == WhatAmI::Router)) + && whatami == WhatAmI::Router) }) .map(|idx| { ( diff --git a/zenoh/src/net/routing/hat/p2p_peer/gossip.rs b/zenoh/src/net/routing/hat/p2p_peer/gossip.rs index 96dc57613a..c413107f85 100644 --- a/zenoh/src/net/routing/hat/p2p_peer/gossip.rs +++ b/zenoh/src/net/routing/hat/p2p_peer/gossip.rs @@ -510,11 +510,11 @@ impl Network { .graph .node_indices() .filter(|&idx| { - (self.gossip_multihop + self.gossip_multihop || self.links.values().any(|link| link.zid == zid) || (self.router_peers_failover_brokering && idx == self.idx - && whatami == WhatAmI::Router)) + && whatami == WhatAmI::Router) }) .map(|idx| { ( diff --git a/zenoh/src/net/routing/hat/router/network.rs b/zenoh/src/net/routing/hat/router/network.rs index 71ec8c0dcc..aa1209b7ed 100644 --- a/zenoh/src/net/routing/hat/router/network.rs +++ b/zenoh/src/net/routing/hat/router/network.rs @@ -779,12 +779,12 @@ impl Network { .graph .node_indices() .filter(|&idx| { - (self.full_linkstate + self.full_linkstate || self.gossip_multihop || self.links.values().any(|link| link.zid == zid) || (self.router_peers_failover_brokering && idx == self.idx - && whatami == WhatAmI::Router)) + && whatami == WhatAmI::Router) }) .map(|idx| { (