Skip to content

Commit

Permalink
omg! local and remote parsed from cmd args should not be reversed
Browse files Browse the repository at this point in the history
  • Loading branch information
zephyrchien committed Apr 11, 2022
1 parent 5151253 commit 9fa72cc
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions cmd/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,9 @@ use kaminari_cmd::{Endpoint, parse_cmd, parse_env};

#[tokio::main]
async fn main() -> Result<()> {
let (
Endpoint {
local: remote,
remote: local,
},
options,
) = parse_env().or_else(|_| parse_cmd())?;
let (Endpoint { local, remote }, options) = parse_env()
.map(|(Endpoint { local, remote }, opt)| (Endpoint { remote, local }, opt))
.or_else(|_| parse_cmd())?;

let ws = opt::get_ws_conf(&options);
let tls = opt::get_tls_server_conf(&options);
Expand Down

0 comments on commit 9fa72cc

Please sign in to comment.