Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowhatter committed Dec 8, 2023
1 parent 1aa7232 commit 442faff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
11 changes: 0 additions & 11 deletions io/zenoh-transport/src/unicast/lowlatency/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
// Contributors:
// ZettaScale Zenoh Team, <[email protected]>
//
#[cfg(feature = "transport_unixpipe")]
use super::link::send_with_link;
#[cfg(feature = "stats")]
use crate::stats::TransportStats;
use crate::{
Expand All @@ -24,20 +22,12 @@ use crate::{
TransportManager, TransportPeerEventHandler,
};
use async_executor::Task;
#[cfg(feature = "transport_unixpipe")]
use async_std::sync::RwLockUpgradableReadGuard;
use async_std::sync::{Mutex as AsyncMutex, MutexGuard as AsyncMutexGuard, RwLock};
use async_std::task::JoinHandle;
use async_trait::async_trait;
use std::sync::{Arc, RwLock as SyncRwLock};
use std::time::Duration;
#[cfg(feature = "transport_unixpipe")]
use zenoh_core::zasyncread_upgradable;
use zenoh_core::{zasynclock, zasyncread, zasyncwrite, zread, zwrite};
#[cfg(feature = "transport_unixpipe")]
use zenoh_link::unixpipe::UNIXPIPE_LOCATOR_PREFIX;
use zenoh_link::Link;
#[cfg(feature = "transport_unixpipe")]
use zenoh_link::Link;
use zenoh_protocol::network::NetworkMessage;
use zenoh_protocol::transport::TransportBodyLowLatency;
Expand All @@ -47,7 +37,6 @@ use zenoh_protocol::{
core::{WhatAmI, ZenohId},
transport::close,
};
#[cfg(not(feature = "transport_unixpipe"))]
use zenoh_result::{zerror, ZResult};

/*************************************/
Expand Down
4 changes: 2 additions & 2 deletions io/zenoh-transport/src/unicast/universal/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ impl TransportUnicastTrait for TransportUnicastUniversal {
other_initial_sn: TransportSn,
other_lease: Duration,
) -> AddLinkResult {
let _add_link_guard = zasynclock!(self.add_link_lock);
let add_link_guard = zasynclock!(self.add_link_lock);

// Check if we can add more inbound links
{
Expand Down Expand Up @@ -336,7 +336,7 @@ impl TransportUnicastTrait for TransportUnicastUniversal {
*guard = links.into_boxed_slice();

drop(guard);
drop(_add_link_guard);
drop(add_link_guard);

// create a callback to start the link
let start_link = Box::new(move || {
Expand Down

0 comments on commit 442faff

Please sign in to comment.