From 5c7fa18634bf406458984404b779f4719e09bbc2 Mon Sep 17 00:00:00 2001 From: ssrlive <30760636+ssrlive@users.noreply.github.com> Date: Sat, 23 Dec 2023 01:31:06 +0800 Subject: [PATCH] unit-tests issues fixing --- src/args.rs | 4 ++-- src/client.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/args.rs b/src/args.rs index 88f3a5e..8944b1e 100644 --- a/src/args.rs +++ b/src/args.rs @@ -43,7 +43,7 @@ pub struct Args { /// run in client mode; value is the server's address #[arg(short, long, value_name = "host", conflicts_with = "server")] - pub client: Option, + pub client: Option, /// run in reverse-mode (server sends, client receives) #[arg(short = 'R', long, conflicts_with = "server")] @@ -109,7 +109,7 @@ pub struct Args { /// primarily to avoid including TCP ramp-up in averages; /// using this option may result in disagreement between bytes sent and received, /// since data can be in-flight across time-boundaries - #[arg(short, long, default_value = "0", value_name = "seconds", conflicts_with = "server")] + #[arg(short = 'O', long, default_value = "0", value_name = "seconds", conflicts_with = "server")] pub omit: usize, /// use no-delay mode for TCP tests, disabling Nagle's Algorithm diff --git a/src/client.rs b/src/client.rs index 2b59d8b..72b9a85 100644 --- a/src/client.rs +++ b/src/client.rs @@ -129,7 +129,7 @@ pub fn execute(args: &args::Args) -> BoxResult<()> { let mut download_config = prepare_download_configuration(args, test_id.as_bytes())?; //connect to the server - let mut stream = connect_to_server(&args.client.unwrap().to_string(), &args.port)?; + let mut stream = connect_to_server(args.client.as_ref().unwrap(), &args.port)?; let server_addr = stream.peer_addr()?; //scaffolding to track and relay the streams and stream-results associated with this test