@@ -116,12 +116,6 @@ pub fn parse_config(args: Vec<String> ) -> Config {
116116 }
117117 }
118118
119- let filter = if !matches. free . is_empty ( ) {
120- Some ( matches. free [ 0 ] . clone ( ) )
121- } else {
122- None
123- } ;
124-
125119 Config {
126120 compile_lib_path : matches. opt_str ( "compile-lib-path" ) . unwrap ( ) ,
127121 run_lib_path : matches. opt_str ( "run-lib-path" ) . unwrap ( ) ,
@@ -137,7 +131,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
137131 stage_id : matches. opt_str ( "stage-id" ) . unwrap ( ) ,
138132 mode : matches. opt_str ( "mode" ) . unwrap ( ) . parse ( ) . ok ( ) . expect ( "invalid mode" ) ,
139133 run_ignored : matches. opt_present ( "ignored" ) ,
140- filter : filter ,
134+ filter : matches . free . first ( ) . cloned ( ) ,
141135 logfile : matches. opt_str ( "logfile" ) . map ( |s| PathBuf :: from ( & s) ) ,
142136 runtool : matches. opt_str ( "runtool" ) ,
143137 host_rustcflags : matches. opt_str ( "host-rustcflags" ) ,
@@ -251,10 +245,7 @@ pub fn run_tests(config: &Config) {
251245
252246pub fn test_opts ( config : & Config ) -> test:: TestOpts {
253247 test:: TestOpts {
254- filter : match config. filter {
255- None => None ,
256- Some ( ref filter) => Some ( filter. clone ( ) ) ,
257- } ,
248+ filter : config. filter . clone ( ) ,
258249 run_ignored : config. run_ignored ,
259250 logfile : config. logfile . clone ( ) ,
260251 run_tests : true ,
0 commit comments