diff options
| author | Corey Farwell <coreyf@rwell.org> | 2016-03-13 23:24:03 -0400 |
|---|---|---|
| committer | Corey Farwell <coreyf@rwell.org> | 2016-03-14 14:43:16 -0400 |
| commit | 8f008ba4eed563cc2995509048ae638a64426a96 (patch) | |
| tree | f902ce9cec1099f8b77d220135f5711d8ed78b46 /src | |
| parent | 170f4708bb48234a2f1a089342b31a424ac94fa9 (diff) | |
| download | rust-8f008ba4eed563cc2995509048ae638a64426a96.tar.gz rust-8f008ba4eed563cc2995509048ae638a64426a96.zip | |
Clean up cloning logic in compiletest.rs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/compiletest/compiletest.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 74c02d00a0a..458a3a8c739 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -116,12 +116,6 @@ pub fn parse_config(args: Vec<String> ) -> Config { } } - let filter = if !matches.free.is_empty() { - Some(matches.free[0].clone()) - } else { - None - }; - Config { compile_lib_path: matches.opt_str("compile-lib-path").unwrap(), run_lib_path: matches.opt_str("run-lib-path").unwrap(), @@ -137,7 +131,7 @@ pub fn parse_config(args: Vec<String> ) -> Config { stage_id: matches.opt_str("stage-id").unwrap(), mode: matches.opt_str("mode").unwrap().parse().ok().expect("invalid mode"), run_ignored: matches.opt_present("ignored"), - filter: filter, + filter: matches.free.first().cloned(), logfile: matches.opt_str("logfile").map(|s| PathBuf::from(&s)), runtool: matches.opt_str("runtool"), host_rustcflags: matches.opt_str("host-rustcflags"), @@ -251,10 +245,7 @@ pub fn run_tests(config: &Config) { pub fn test_opts(config: &Config) -> test::TestOpts { test::TestOpts { - filter: match config.filter { - None => None, - Some(ref filter) => Some(filter.clone()), - }, + filter: config.filter.clone(), run_ignored: config.run_ignored, logfile: config.logfile.clone(), run_tests: true, |
