From e9d4adf9d36b27defe8034c155a98930c75d6364 Mon Sep 17 00:00:00 2001 From: Mirus Date: Mon, 18 Dec 2023 19:19:31 +0800 Subject: [PATCH] Fix short name conflict and reorder arguments --- src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index a7c7aaa..92b0ca5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,15 +7,15 @@ use local_ip_address::local_ip; #[derive(Parser)] #[clap(version)] struct Args { - /// Set the listener port - #[clap(short, long, default_value_t = 8000)] - port: u16, - /// Set the listener host [default: LAN IP address] - #[clap(short, long)] - host: Option, /// Set the root path of the static assets #[clap(default_value = ".")] root: String, + /// Set the listener host [default: LAN IP address] + #[clap(short='s', long)] + host: Option, + /// Set the listener port + #[clap(short, long, default_value_t = 8000)] + port: u16, } #[async_std::main]