Skip to content

Commit 3d8d2b6

Browse files
author
Hugo Laloge
committed
Add attributes to make the linter pass when the netlink feature is not compiled
1 parent d5418be commit 3d8d2b6

File tree

1 file changed

+6
-5
lines changed
  • commons/zenoh-util/src/net

1 file changed

+6
-5
lines changed

commons/zenoh-util/src/net/mod.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,18 @@
1111
// Contributors:
1212
// ZettaScale Zenoh Team, <[email protected]>
1313
//
14-
use std::{
15-
net::{IpAddr, Ipv6Addr},
16-
sync::RwLock,
17-
};
14+
use std::net::{IpAddr, Ipv6Addr};
15+
#[cfg(unix)]
16+
use std::sync::RwLock;
1817

1918
#[cfg(unix)]
2019
use lazy_static::lazy_static;
2120
#[cfg(unix)]
2221
use pnet_datalink::NetworkInterface;
2322
use tokio::net::{TcpSocket, UdpSocket};
24-
use zenoh_core::{zconfigurable, zread, zwrite};
23+
use zenoh_core::zconfigurable;
24+
#[cfg(unix)]
25+
use zenoh_core::{zread, zwrite};
2526
#[cfg(unix)]
2627
use zenoh_result::zerror;
2728
use zenoh_result::{bail, ZResult};

0 commit comments

Comments
 (0)