unify "test", "bench", "example" and "bin" into one branch

This commit is contained in:
Oliver Schneider 2016-08-17 17:43:21 +02:00
parent 32a0069f67
commit 0dab78b3e6
No known key found for this signature in database
GPG key ID: 56D6EEA0FC67AC46

View file

@ -146,12 +146,8 @@ pub fn main() {
if let Err(code) = process(std::iter::once("--lib".to_owned()).chain(args), &dep_path, &sys_root) {
std::process::exit(code);
}
} else if first == "bin" {
if let Err(code) = process(vec!["--bin".to_owned(), target.name].into_iter().chain(args), &dep_path, &sys_root) {
std::process::exit(code);
}
} else if first == "example" {
if let Err(code) = process(vec!["--example".to_owned(), target.name].into_iter().chain(args), &dep_path, &sys_root) {
} else if ["bin", "example", "test", "bench"].contains(&&**first) {
if let Err(code) = process(vec![format!("--{}", first), target.name].into_iter().chain(args), &dep_path, &sys_root) {
std::process::exit(code);
}
}