diff --git a/commons/zenoh-util/src/std_only/net/mod.rs b/commons/zenoh-util/src/std_only/net/mod.rs index ffeb97b593..7b30a6861b 100644 --- a/commons/zenoh-util/src/std_only/net/mod.rs +++ b/commons/zenoh-util/src/std_only/net/mod.rs @@ -116,7 +116,7 @@ unsafe fn get_adapters_adresses() -> ZResult> { } retries += 1; } - + if ret != 0 { bail!("GetAdaptersAddresses returned {}", ret) } @@ -228,7 +228,7 @@ pub fn get_local_addresses() -> ZResult> { use winapi::um::iptypes::IP_ADAPTER_ADDRESSES_LH; let buffer = get_adapters_adresses()?; - + let mut result = vec![]; let mut next_iface = (buffer.as_ptr() as *mut IP_ADAPTER_ADDRESSES_LH).as_ref(); while let Some(iface) = next_iface { diff --git a/io/zenoh-links/zenoh-link-tcp/src/unicast.rs b/io/zenoh-links/zenoh-link-tcp/src/unicast.rs index d5c0a0c55d..71a87df605 100644 --- a/io/zenoh-links/zenoh-link-tcp/src/unicast.rs +++ b/io/zenoh-links/zenoh-link-tcp/src/unicast.rs @@ -148,13 +148,21 @@ impl LinkUnicastTrait for LinkUnicastTcp { fn get_interfaces(&self) -> Vec { match zenoh_util::net::get_interfaces_by_addr(self.src_addr.ip()) { Ok(interfaces) => { - log::debug!("get_interfaces for {:?}: {:?}", self.src_addr.ip(), interfaces); + log::debug!( + "get_interfaces for {:?}: {:?}", + self.src_addr.ip(), + interfaces + ); interfaces - }, + } Err(e) => { - log::error!("get_interfaces for {:?} failed: {:?}", self.src_addr.ip(), e); + log::error!( + "get_interfaces for {:?} failed: {:?}", + self.src_addr.ip(), + e + ); vec![] - }, + } } }