From 148c95e3c411faac5fe9ae26adfd6d370eb35a59 Mon Sep 17 00:00:00 2001 From: Phodal Huang Date: Sun, 7 Feb 2021 16:00:54 +0800 Subject: [PATCH] fix: remove unused server subcommand --- src/bin/visual.rs | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/bin/visual.rs b/src/bin/visual.rs index 931b5bf6..01d9094c 100644 --- a/src/bin/visual.rs +++ b/src/bin/visual.rs @@ -18,7 +18,7 @@ async fn main() -> std::io::Result<()> { Arg::with_name("name") .short("n") .long("name") - .value_name("PROJECT name") + .value_name("project name") .help("project name") .takes_value(true), ) @@ -34,17 +34,12 @@ async fn main() -> std::io::Result<()> { .takes_value(true), ), ) - .subcommand( - App::new("server") - .about("server") - .version(VERSION) - .author("Inherd Group") - .arg( - Arg::with_name("port") - .short("p") - .help("http server port") - .takes_value(true), - ), + .arg( + Arg::with_name("port") + .short("p") + .long("port") + .help("http server port") + .takes_value(true), ) .get_matches(); @@ -65,7 +60,6 @@ async fn main() -> std::io::Result<()> { // todo: add load config let _config = CocoConfig::default(); - let port = match matches.value_of("port") { Some(input) => input, None => "8000",