Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
milyin committed Jun 4, 2024
1 parent efaa910 commit 057a842
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
11 changes: 9 additions & 2 deletions commons/zenoh-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ mod include;
#[allow(unused_imports)]
use std::convert::TryFrom; // This is a false positive from the rust analyser
use std::{
any::Any, collections::HashSet, fmt, io::Read, net::SocketAddr, path::Path, str::FromStr, sync::{Arc, Mutex, MutexGuard, Weak}
any::Any,
collections::HashSet,
fmt,
io::Read,
net::SocketAddr,
path::Path,
str::FromStr,
sync::{Arc, Mutex, MutexGuard, Weak},
};

use include::recursive_include;
Expand Down Expand Up @@ -47,7 +54,7 @@ pub use connection_retry::*;

/// The global unique id of a zenoh peer.
#[derive(
Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, Debug, Default
Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, Debug, Default,
)]
#[repr(transparent)]
pub struct ZenohId(zenoh_protocol::core::ZenohId);
Expand Down
2 changes: 1 addition & 1 deletion zenoh/src/api/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl<'a> Wait for PeersZenohIdBuilder<'a> {
s.get_whatami()
.ok()
.and_then(|what| (what == WhatAmI::Peer).then_some(()))
.and_then(|_| s.get_zid().map(|zid| zid.into()) .ok())
.and_then(|_| s.get_zid().map(|zid| zid.into()).ok())
}),
)
}
Expand Down
3 changes: 1 addition & 2 deletions zenoh/src/api/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ use zenoh_protocol::network::{declare::SubscriberId, ext};
use zenoh_protocol::{
core::{
key_expr::{keyexpr, OwnedKeyExpr},
AtomicExprId, CongestionControl, EntityId, ExprId, Reliability, WireExpr,
EMPTY_EXPR_ID,
AtomicExprId, CongestionControl, EntityId, ExprId, Reliability, WireExpr, EMPTY_EXPR_ID,
},
network::{
self,
Expand Down
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 @@ -26,8 +26,8 @@ use std::{

use zenoh_config::{unwrap_or_default, ModeDependent, WhatAmI, WhatAmIMatcher};
use zenoh_protocol::{
core::ZenohId,
common::ZExtBody,
core::ZenohId,
network::{
declare::{queryable::ext::QueryableInfoType, QueryableId, SubscriberId},
interest::InterestId,
Expand Down
2 changes: 1 addition & 1 deletion zenoh/src/net/routing/hat/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ use std::{any::Any, collections::HashMap, sync::Arc};
use zenoh_buffers::ZBuf;
use zenoh_config::{unwrap_or_default, Config, WhatAmI};
use zenoh_protocol::{
core::ZenohId,
core::WireExpr,
core::ZenohId,
network::{
declare::{
queryable::ext::QueryableInfoType, subscriber::ext::SubscriberInfo, QueryableId,
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 @@ -27,8 +27,8 @@ use std::{

use zenoh_config::{unwrap_or_default, ModeDependent, WhatAmI, WhatAmIMatcher};
use zenoh_protocol::{
core::ZenohId,
common::ZExtBody,
core::ZenohId,
network::{
declare::{queryable::ext::QueryableInfoType, QueryableId, SubscriberId},
interest::InterestId,
Expand Down

0 comments on commit 057a842

Please sign in to comment.