Skip to content

Commit 0b051c7

Browse files
committed
Remove redundant check for Kind::Target.
1 parent 1f14fa3 commit 0b051c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo/core/compiler/unit_dependencies.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ fn attach_std_test<'a, 'cfg>(
194194
.find(|(k, _v)| k.pkg.name().as_str() == "test" && k.target.is_lib())
195195
.expect("test in deps");
196196
for (unit, deps) in state.unit_dependencies.iter_mut() {
197-
if unit.kind == Kind::Target && unit.mode.is_rustc_test() && unit.target.harness() {
197+
if unit.mode.is_rustc_test() && unit.target.harness() {
198198
// `public` here will need to be driven by toml declaration.
199199
deps.push(UnitDep {
200200
unit: *test_unit,

0 commit comments

Comments
 (0)