@@ -116,12 +116,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
116
116
}
117
117
}
118
118
119
- let filter = if !matches. free . is_empty ( ) {
120
- Some ( matches. free [ 0 ] . clone ( ) )
121
- } else {
122
- None
123
- } ;
124
-
125
119
Config {
126
120
compile_lib_path : matches. opt_str ( "compile-lib-path" ) . unwrap ( ) ,
127
121
run_lib_path : matches. opt_str ( "run-lib-path" ) . unwrap ( ) ,
@@ -137,7 +131,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
137
131
stage_id : matches. opt_str ( "stage-id" ) . unwrap ( ) ,
138
132
mode : matches. opt_str ( "mode" ) . unwrap ( ) . parse ( ) . ok ( ) . expect ( "invalid mode" ) ,
139
133
run_ignored : matches. opt_present ( "ignored" ) ,
140
- filter : filter ,
134
+ filter : matches . free . first ( ) . cloned ( ) ,
141
135
logfile : matches. opt_str ( "logfile" ) . map ( |s| PathBuf :: from ( & s) ) ,
142
136
runtool : matches. opt_str ( "runtool" ) ,
143
137
host_rustcflags : matches. opt_str ( "host-rustcflags" ) ,
@@ -251,10 +245,7 @@ pub fn run_tests(config: &Config) {
251
245
252
246
pub fn test_opts ( config : & Config ) -> test:: TestOpts {
253
247
test:: TestOpts {
254
- filter : match config. filter {
255
- None => None ,
256
- Some ( ref filter) => Some ( filter. clone ( ) ) ,
257
- } ,
248
+ filter : config. filter . clone ( ) ,
258
249
run_ignored : config. run_ignored ,
259
250
logfile : config. logfile . clone ( ) ,
260
251
run_tests : true ,
0 commit comments