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::().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(()) }