diff options
author | rustdesk <[email protected]> | 2024-05-24 17:57:37 +0800 |
---|---|---|
committer | rustdesk <[email protected]> | 2024-05-24 17:57:37 +0800 |
commit | c4c26dd6d76f00fccfab6e49d55293120d75750e (patch) | |
tree | 794ac7bc9f8f89478e39cfedc9bc44d542045120 /src | |
parent | 4240c47244d7775637c53503fe821fcbe5c6af4c (diff) | |
download | rustdesk-server-c4c26dd6d76f00fccfab6e49d55293120d75750e.tar.gz rustdesk-server-c4c26dd6d76f00fccfab6e49d55293120d75750e.zip |
change -k to default _
Diffstat (limited to 'src')
-rw-r--r-- | src/hbbr.rs | 2 | ||||
-rw-r--r-- | src/main.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/hbbr.rs b/src/hbbr.rs index 4c8a784..49d449c 100644 --- a/src/hbbr.rs +++ b/src/hbbr.rs @@ -39,7 +39,7 @@ fn main() -> ResultType<()> { matches.value_of("port").unwrap_or(&port.to_string()), matches .value_of("key") - .unwrap_or(&std::env::var("KEY").unwrap_or_default()), + .unwrap_or(&std::env::var("KEY").unwrap_or("-".to_owned())), )?; Ok(()) } diff --git a/src/main.rs b/src/main.rs index 36233ee..902fc1e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,6 +31,6 @@ fn main() -> ResultType<()> { } let rmem = get_arg("rmem").parse::<usize>().unwrap_or(RMEM); let serial: i32 = get_arg("serial").parse().unwrap_or(0); - RendezvousServer::start(port, serial, &get_arg("key"), rmem)?; + RendezvousServer::start(port, serial, &get_arg_or("key", "-".to_owned()), rmem)?; Ok(()) } |