From f57053b60ec117840272b428b4876b3de4425db4 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Wed, 4 Sep 2019 01:27:36 +0200 Subject: Upgrade to structopt 0.3 --- src/args.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/args.rs') diff --git a/src/args.rs b/src/args.rs index 925d3dd..47f4d1f 100644 --- a/src/args.rs +++ b/src/args.rs @@ -14,7 +14,9 @@ const ROUTE_ALPHABET: [char; 16] = [ #[derive(StructOpt)] #[structopt( name = "miniserve", - raw(global_settings = "&[structopt::clap::AppSettings::ColoredHelp]") + author, + about, + global_settings = &[structopt::clap::AppSettings::ColoredHelp], )] struct CLIArgs { /// Be verbose, includes emitting access logs @@ -33,8 +35,8 @@ struct CLIArgs { #[structopt( short = "i", long = "interfaces", - parse(try_from_str = "parse_interface"), - raw(number_of_values = "1") + parse(try_from_str = parse_interface), + number_of_values = 1, )] interfaces: Vec, @@ -44,8 +46,8 @@ struct CLIArgs { #[structopt( short = "a", long = "auth", - parse(try_from_str = "parse_auth"), - raw(number_of_values = "1") + parse(try_from_str = parse_auth), + number_of_values = 1, )] auth: Vec, @@ -62,10 +64,8 @@ struct CLIArgs { short = "c", long = "color-scheme", default_value = "Squirrel", - raw( - possible_values = "&themes::ColorScheme::variants()", - case_insensitive = "true", - ) + possible_values = &themes::ColorScheme::variants(), + case_insensitive = true, )] color_scheme: themes::ColorScheme, -- cgit v1.2.3