Skip to content

Commit

Permalink
Cargo fmt & clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanYuYuan committed Feb 2, 2024
1 parent 6446a12 commit b67be59
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion zenoh/src/net/routing/hat/linkstate_peer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ use crate::{
},
runtime::Runtime,
};
use tokio::task::JoinHandle;
use std::{
any::Any,
collections::{HashMap, HashSet},
sync::Arc,
};
use tokio::task::JoinHandle;
use zenoh_config::{unwrap_or_default, ModeDependent, WhatAmI, WhatAmIMatcher, ZenohId};
use zenoh_protocol::{
common::ZExtBody,
Expand Down
6 changes: 4 additions & 2 deletions zenoh/src/net/routing/hat/linkstate_peer/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,8 @@ impl Network {

if !self.autoconnect.is_empty() {
// Connect discovered peers
if zenoh_runtime::ZRuntime::Net.block_in_place(self.runtime.manager().get_transport_unicast(&zid))
if zenoh_runtime::ZRuntime::Net
.block_in_place(self.runtime.manager().get_transport_unicast(&zid))
.is_none()
&& self.autoconnect.matches(whatami)
{
Expand Down Expand Up @@ -605,7 +606,8 @@ impl Network {
for (_, idx, _) in &link_states {
let node = &self.graph[*idx];
if let Some(whatami) = node.whatami {
if zenoh_runtime::ZRuntime::Net.block_in_place(self.runtime.manager().get_transport_unicast(&node.zid))
if zenoh_runtime::ZRuntime::Net
.block_in_place(self.runtime.manager().get_transport_unicast(&node.zid))
.is_none()
&& self.autoconnect.matches(whatami)
{
Expand Down
3 changes: 2 additions & 1 deletion zenoh/src/net/routing/hat/p2p_peer/gossip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,8 @@ impl Network {

if !self.autoconnect.is_empty() {
// Connect discovered peers
if zenoh_runtime::ZRuntime::Net.block_in_place(self.runtime.manager().get_transport_unicast(&zid))
if zenoh_runtime::ZRuntime::Net
.block_in_place(self.runtime.manager().get_transport_unicast(&zid))
.is_none()
&& self.autoconnect.matches(whatami)
{
Expand Down
2 changes: 1 addition & 1 deletion zenoh/src/net/routing/hat/router/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ use crate::{
},
runtime::Runtime,
};
use tokio::task::JoinHandle;
use std::{
any::Any,
collections::{hash_map::DefaultHasher, HashMap, HashSet},
hash::Hasher,
sync::Arc,
};
use tokio::task::JoinHandle;
use zenoh_config::{unwrap_or_default, ModeDependent, WhatAmI, WhatAmIMatcher, ZenohId};
use zenoh_protocol::{
common::ZExtBody,
Expand Down

0 comments on commit b67be59

Please sign in to comment.