@@ -8,7 +8,6 @@ use clap::{App, Arg, SubCommand};
8
8
9
9
use test:: Bencher ;
10
10
11
- static M_VAL_NAMES : [ & ' static str ; 2 ] = [ "one" , "two" ] ;
12
11
static ARGS : & ' static str = "-o --option=[opt]... 'tests options'
13
12
[positional] 'tests positionals'" ;
14
13
static OPT3_VALS : [ & ' static str ; 2 ] = [ "fast" , "slow" ] ;
@@ -29,8 +28,8 @@ macro_rules! create_app {
29
28
Arg :: from_usage( "[positional2] 'tests positionals with exclusions'" ) ,
30
29
Arg :: from_usage( "-O --Option [option3] 'tests options with specific value sets'" ) . possible_values( & OPT3_VALS ) ,
31
30
Arg :: from_usage( "[positional3]... 'tests positionals with specific values'" ) . possible_values( & POS3_VALS ) ,
32
- Arg :: from_usage( "--multvals [multvals] 'Tests mutliple values, not mult occs'" ) . value_names ( & M_VAL_NAMES ) ,
33
- Arg :: from_usage( "--multvalsmo [multvalsmo] ... 'Tests mutliple values, not mult occs'" ) . value_names ( & M_VAL_NAMES ) ,
31
+ Arg :: from_usage( "--multvals [one] [two] 'Tests mutliple values, not mult occs'" ) ,
32
+ Arg :: from_usage( "--multvalsmo... [one] [two] 'Tests mutliple values, not mult occs'" ) ,
34
33
Arg :: from_usage( "--minvals2 [minvals]... 'Tests 2 min vals'" ) . min_values( 2 ) ,
35
34
Arg :: from_usage( "--maxvals3 [maxvals]... 'Tests 3 max vals'" ) . max_values( 3 )
36
35
] )
@@ -100,13 +99,13 @@ fn create_app_builder(b: &mut Bencher) {
100
99
. long ( "multvals" )
101
100
. takes_value ( true )
102
101
. help ( "Tests mutliple values, not mult occs" )
103
- . value_names ( & M_VAL_NAMES ) )
102
+ . value_names ( & [ "one" , "two" ] ) )
104
103
. arg ( Arg :: with_name ( "multvalsmo" )
105
104
. long ( "multvalsmo" )
106
105
. takes_value ( true )
107
106
. multiple ( true )
108
107
. help ( "Tests mutliple values, not mult occs" )
109
- . value_names ( & M_VAL_NAMES ) )
108
+ . value_names ( & [ "one" , "two" ] ) )
110
109
. arg ( Arg :: with_name ( "minvals" )
111
110
. long ( "minvals2" )
112
111
. multiple ( true )
@@ -135,7 +134,8 @@ fn create_app_builder(b: &mut Bencher) {
135
134
} ) ;
136
135
}
137
136
138
- #[ bench]
137
+ #[ cfg( feature = "unstable" ) ]
138
+ #[ cfg_attr( feature = "unstable" , bench) ]
139
139
fn create_app_macros ( b : & mut Bencher ) {
140
140
b. iter ( || {
141
141
clap_app ! ( claptests =>
0 commit comments