Skip to content

Commit

Permalink
Don't change order of tests and benches for cleaner diff.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Oct 20, 2017
1 parent e171e00 commit efc0dd1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/cargo/ops/cargo_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,14 +652,6 @@ fn generate_targets<'a>(pkg: &'a Package,
pkg, bins, "bin", Target::is_bin, profile)?);
targets.append(&mut propose_indicated_targets(
pkg, examples, "example", Target::is_example, profile)?);
// If --benches was specified, add all targets that would be
// generated by `cargo bench`.
let bench_filter = match benches {
FilterRule::All => Target::benched,
FilterRule::Just(_) => Target::is_bench
};
targets.append(&mut propose_indicated_targets(
pkg, benches, "bench", bench_filter, bench_profile)?);
// If --tests was specified, add all targets that would be
// generated by `cargo test`.
let test_filter = match tests {
Expand All @@ -668,6 +660,14 @@ fn generate_targets<'a>(pkg: &'a Package,
};
targets.append(&mut propose_indicated_targets(
pkg, tests, "test", test_filter, test_profile)?);
// If --benches was specified, add all targets that would be
// generated by `cargo bench`.
let bench_filter = match benches {
FilterRule::All => Target::benched,
FilterRule::Just(_) => Target::is_bench
};
targets.append(&mut propose_indicated_targets(
pkg, benches, "bench", bench_filter, bench_profile)?);
targets
}
};
Expand Down

0 comments on commit efc0dd1

Please sign in to comment.