Skip to content

Commit

Permalink
change -k to default _
Browse files Browse the repository at this point in the history
  • Loading branch information
rustdesk committed May 24, 2024
1 parent 4240c47 commit c4c26dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hbbr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}

0 comments on commit c4c26dd

Please sign in to comment.