Skip to content

Commit

Permalink
chore(clippy): fixing clippy
Browse files Browse the repository at this point in the history
Signed-off-by: gabrik <[email protected]>
  • Loading branch information
gabrik committed Apr 2, 2024
1 parent ae6b1e5 commit 050290c
Show file tree
Hide file tree
Showing 18 changed files with 104 additions and 104 deletions.
2 changes: 1 addition & 1 deletion commons/zenoh-codec/tests/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ fn codec_shm_info() {
// Common
#[test]
fn codec_extension() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();

macro_rules! run_extension_single {
($ext:ty, $buff:expr) => {
Expand Down
24 changes: 12 additions & 12 deletions io/zenoh-transport/tests/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async fn run(endpoints: &[EndPoint]) {
#[cfg(feature = "transport_tcp")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn endpoint_tcp() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
// Define the locators
let endpoints: Vec<EndPoint> = vec![
format!("tcp/127.0.0.1:{}", 7000).parse().unwrap(),
Expand All @@ -112,7 +112,7 @@ async fn endpoint_tcp() {
#[cfg(feature = "transport_udp")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn endpoint_udp() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
// Define the locators
let endpoints: Vec<EndPoint> = vec![
format!("udp/127.0.0.1:{}", 7010).parse().unwrap(),
Expand All @@ -125,7 +125,7 @@ async fn endpoint_udp() {
#[cfg(all(feature = "transport_unixsock-stream", target_family = "unix"))]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn endpoint_unix() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
// Remove the files if they still exists
let f1 = "zenoh-test-unix-socket-0.sock";
let f2 = "zenoh-test-unix-socket-1.sock";
Expand All @@ -146,7 +146,7 @@ async fn endpoint_unix() {
#[cfg(feature = "transport_ws")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn endpoint_ws() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
// Define the locators
let endpoints: Vec<EndPoint> = vec![
format!("ws/127.0.0.1:{}", 7020).parse().unwrap(),
Expand All @@ -159,7 +159,7 @@ async fn endpoint_ws() {
#[cfg(feature = "transport_unixpipe")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn endpoint_unixpipe() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
// Define the locators
let endpoints: Vec<EndPoint> = vec![
"unixpipe/endpoint_unixpipe".parse().unwrap(),
Expand All @@ -173,7 +173,7 @@ async fn endpoint_unixpipe() {
#[cfg(all(feature = "transport_tcp", feature = "transport_udp"))]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn endpoint_tcp_udp() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
// Define the locators
let endpoints: Vec<EndPoint> = vec![
format!("tcp/127.0.0.1:{}", 7030).parse().unwrap(),
Expand All @@ -192,7 +192,7 @@ async fn endpoint_tcp_udp() {
))]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn endpoint_tcp_udp_unix() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
// Remove the file if it still exists
let f1 = "zenoh-test-unix-socket-2.sock";
let _ = std::fs::remove_file(f1);
Expand All @@ -216,7 +216,7 @@ async fn endpoint_tcp_udp_unix() {
))]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn endpoint_tcp_unix() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
// Remove the file if it still exists
let f1 = "zenoh-test-unix-socket-3.sock";
let _ = std::fs::remove_file(f1);
Expand All @@ -238,7 +238,7 @@ async fn endpoint_tcp_unix() {
))]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn endpoint_udp_unix() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
// Remove the file if it still exists
let f1 = "zenoh-test-unix-socket-4.sock";
let _ = std::fs::remove_file(f1); // Define the locators
Expand All @@ -257,7 +257,7 @@ async fn endpoint_udp_unix() {
async fn endpoint_tls() {
use zenoh_link::tls::config::*;

let _ = zenoh_util::init_log();
zenoh_util::init_log();

// NOTE: this an auto-generated pair of certificate and key.
// The target domain is localhost, so it has no real
Expand Down Expand Up @@ -336,7 +336,7 @@ AXVFFIgCSluyrolaD6CWD9MqOex4YOfJR2bNxI7lFvuK4AwjyUJzT1U1HXib17mM
async fn endpoint_quic() {
use zenoh_link::quic::config::*;

let _ = zenoh_util::init_log();
zenoh_util::init_log();

// NOTE: this an auto-generated pair of certificate and key.
// The target domain is localhost, so it has no real
Expand Down Expand Up @@ -412,7 +412,7 @@ AXVFFIgCSluyrolaD6CWD9MqOex4YOfJR2bNxI7lFvuK4AwjyUJzT1U1HXib17mM
#[cfg(all(feature = "transport_vsock", target_os = "linux"))]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn endpoint_vsock() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
// Define the locators
let endpoints: Vec<EndPoint> = vec![
"vsock/-1:1234".parse().unwrap(),
Expand Down
6 changes: 3 additions & 3 deletions io/zenoh-transport/tests/transport_whitelist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ async fn run(endpoints: &[EndPoint]) {
#[cfg(feature = "transport_tcp")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn transport_whitelist_tcp() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();

// Define the locators
let endpoints: Vec<EndPoint> = vec![
Expand All @@ -132,7 +132,7 @@ async fn transport_whitelist_tcp() {
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[ignore]
async fn transport_whitelist_unixpipe() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();

// Define the locators
let endpoints: Vec<EndPoint> = vec![
Expand All @@ -146,7 +146,7 @@ async fn transport_whitelist_unixpipe() {
#[cfg(all(feature = "transport_vsock", target_os = "linux"))]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn transport_whitelist_vsock() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();

// Define the locators
let endpoints: Vec<EndPoint> = vec![
Expand Down
22 changes: 11 additions & 11 deletions io/zenoh-transport/tests/unicast_authenticator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,31 +637,31 @@ async fn run_with_lowlatency_transport(endpoint: &EndPoint) {
#[cfg(feature = "transport_tcp")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn authenticator_tcp() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = format!("tcp/127.0.0.1:{}", 8000).parse().unwrap();
run_with_universal_transport(&endpoint).await;
}

#[cfg(feature = "transport_tcp")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn authenticator_tcp_with_lowlatency_transport() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = format!("tcp/127.0.0.1:{}", 8100).parse().unwrap();
run_with_lowlatency_transport(&endpoint).await;
}

#[cfg(feature = "transport_udp")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn authenticator_udp() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = format!("udp/127.0.0.1:{}", 8010).parse().unwrap();
run_with_universal_transport(&endpoint).await;
}

#[cfg(feature = "transport_udp")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn authenticator_udp_with_lowlatency_transport() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = format!("udp/127.0.0.1:{}", 8110).parse().unwrap();
run_with_lowlatency_transport(&endpoint).await;
}
Expand All @@ -670,7 +670,7 @@ async fn authenticator_udp_with_lowlatency_transport() {
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[ignore]
async fn authenticator_unixpipe() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = "unixpipe/authenticator_unixpipe_test".parse().unwrap();
run_with_universal_transport(&endpoint).await;
}
Expand All @@ -679,7 +679,7 @@ async fn authenticator_unixpipe() {
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[ignore]
async fn authenticator_unixpipe_with_lowlatency_transport() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = "unixpipe/authenticator_unixpipe_with_lowlatency_transport"
.parse()
.unwrap();
Expand All @@ -690,7 +690,7 @@ async fn authenticator_unixpipe_with_lowlatency_transport() {
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[ignore]
async fn authenticator_ws() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = format!("ws/127.0.0.1:{}", 8020).parse().unwrap();
run_with_universal_transport(&endpoint).await;
}
Expand All @@ -699,15 +699,15 @@ async fn authenticator_ws() {
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[ignore]
async fn authenticator_ws_with_lowlatency_transport() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = format!("ws/127.0.0.1:{}", 8120).parse().unwrap();
run_with_lowlatency_transport(&endpoint).await;
}

#[cfg(all(feature = "transport_unixsock-stream", target_family = "unix"))]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn authenticator_unix() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let f1 = "zenoh-test-unix-socket-10.sock";
let _ = std::fs::remove_file(f1);
let endpoint: EndPoint = format!("unixsock-stream/{f1}").parse().unwrap();
Expand All @@ -721,7 +721,7 @@ async fn authenticator_unix() {
async fn authenticator_tls() {
use zenoh_link::tls::config::*;

let _ = zenoh_util::init_log();
zenoh_util::init_log();

// NOTE: this an auto-generated pair of certificate and key.
// The target domain is localhost, so it has no real
Expand Down Expand Up @@ -821,7 +821,7 @@ R+IdLiXcyIkg0m9N8I17p0ljCSkbrgGMD3bbePRTfg==
async fn authenticator_quic() {
use zenoh_link::quic::config::*;

let _ = zenoh_util::init_log();
zenoh_util::init_log();

// NOTE: this an auto-generated pair of certificate and key.
// The target domain is localhost, so it has no real
Expand Down
8 changes: 4 additions & 4 deletions io/zenoh-transport/tests/unicast_compression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ mod tests {
#[cfg(feature = "transport_tcp")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn transport_unicast_compression_tcp_only() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();

// Define the locators
let endpoints: Vec<EndPoint> = vec![
Expand All @@ -447,7 +447,7 @@ mod tests {
#[cfg(feature = "transport_tcp")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn transport_unicast_compression_tcp_only_with_lowlatency_transport() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();

// Define the locators
let endpoints: Vec<EndPoint> = vec![format!("tcp/127.0.0.1:{}", 19100).parse().unwrap()];
Expand All @@ -469,7 +469,7 @@ mod tests {
#[cfg(feature = "transport_udp")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn transport_unicast_compression_udp_only() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();

// Define the locator
let endpoints: Vec<EndPoint> = vec![
Expand All @@ -494,7 +494,7 @@ mod tests {
#[cfg(feature = "transport_udp")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn transport_unicast_compression_udp_only_with_lowlatency_transport() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();

// Define the locator
let endpoints: Vec<EndPoint> = vec![format!("udp/127.0.0.1:{}", 19110).parse().unwrap()];
Expand Down
6 changes: 3 additions & 3 deletions io/zenoh-transport/tests/unicast_concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ async fn transport_concurrent(endpoint01: Vec<EndPoint>, endpoint02: Vec<EndPoin
#[cfg(feature = "transport_tcp")]
#[tokio::test]
async fn transport_tcp_concurrent() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();

let endpoint01: Vec<EndPoint> = vec![
format!("tcp/127.0.0.1:{}", 9000).parse().unwrap(),
Expand Down Expand Up @@ -378,7 +378,7 @@ async fn transport_tcp_concurrent() {
#[tokio::test]
#[ignore]
async fn transport_ws_concurrent() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();

let endpoint01: Vec<EndPoint> = vec![
format!("ws/127.0.0.1:{}", 9020).parse().unwrap(),
Expand Down Expand Up @@ -408,7 +408,7 @@ async fn transport_ws_concurrent() {
#[tokio::test]
#[ignore]
async fn transport_unixpipe_concurrent() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();

let endpoint01: Vec<EndPoint> = vec![
"unixpipe/transport_unixpipe_concurrent".parse().unwrap(),
Expand Down
6 changes: 3 additions & 3 deletions io/zenoh-transport/tests/unicast_defragmentation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ async fn run(endpoint: &EndPoint, channel: Channel, msg_size: usize) {
#[cfg(feature = "transport_tcp")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn transport_unicast_defragmentation_tcp_only() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();

// Define the locators
let endpoint: EndPoint = format!("tcp/127.0.0.1:{}", 11000).parse().unwrap();
Expand Down Expand Up @@ -164,7 +164,7 @@ async fn transport_unicast_defragmentation_tcp_only() {
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[ignore]
async fn transport_unicast_defragmentation_ws_only() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();

// Define the locators
let endpoint: EndPoint = format!("ws/127.0.0.1:{}", 11010).parse().unwrap();
Expand Down Expand Up @@ -197,7 +197,7 @@ async fn transport_unicast_defragmentation_ws_only() {
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[ignore]
async fn transport_unicast_defragmentation_unixpipe_only() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();

// Define the locators
let endpoint: EndPoint = "unixpipe/transport_unicast_defragmentation_unixpipe_only"
Expand Down
14 changes: 7 additions & 7 deletions io/zenoh-transport/tests/unicast_intermittent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,15 +414,15 @@ async fn lowlatency_transport_intermittent(endpoint: &EndPoint) {
#[cfg(feature = "transport_tcp")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn transport_tcp_intermittent() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = format!("tcp/127.0.0.1:{}", 12000).parse().unwrap();
universal_transport_intermittent(&endpoint).await;
}

#[cfg(feature = "transport_tcp")]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn transport_tcp_intermittent_for_lowlatency_transport() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = format!("tcp/127.0.0.1:{}", 12100).parse().unwrap();
lowlatency_transport_intermittent(&endpoint).await;
}
Expand All @@ -431,7 +431,7 @@ async fn transport_tcp_intermittent_for_lowlatency_transport() {
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[ignore]
async fn transport_ws_intermittent() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = format!("ws/127.0.0.1:{}", 12010).parse().unwrap();
universal_transport_intermittent(&endpoint).await;
}
Expand All @@ -440,7 +440,7 @@ async fn transport_ws_intermittent() {
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[ignore]
async fn transport_ws_intermittent_for_lowlatency_transport() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = format!("ws/127.0.0.1:{}", 12110).parse().unwrap();
lowlatency_transport_intermittent(&endpoint).await;
}
Expand All @@ -449,7 +449,7 @@ async fn transport_ws_intermittent_for_lowlatency_transport() {
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[ignore]
async fn transport_unixpipe_intermittent() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = "unixpipe/transport_unixpipe_intermittent".parse().unwrap();
universal_transport_intermittent(&endpoint).await;
}
Expand All @@ -458,7 +458,7 @@ async fn transport_unixpipe_intermittent() {
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
#[ignore]
async fn transport_unixpipe_intermittent_for_lowlatency_transport() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = "unixpipe/transport_unixpipe_intermittent_for_lowlatency_transport"
.parse()
.unwrap();
Expand All @@ -468,7 +468,7 @@ async fn transport_unixpipe_intermittent_for_lowlatency_transport() {
#[cfg(all(feature = "transport_vsock", target_os = "linux"))]
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn transport_vsock_intermittent() {
let _ = zenoh_util::init_log();
zenoh_util::init_log();
let endpoint: EndPoint = "vsock/VMADDR_CID_LOCAL:17000".parse().unwrap();
universal_transport_intermittent(&endpoint).await;
}
Loading

0 comments on commit 050290c

Please sign in to comment.