Skip to content

Commit 28ec9b1

Browse files
jofasweihanglo
andauthored
Update src/cargo/core/compiler/compilation.rs
Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
1 parent ef227e4 commit 28ec9b1

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/cargo/core/compiler/compilation.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -394,15 +394,7 @@ fn get_sysroot_target_libdir(
394394
let dependency = bcx
395395
.unit_graph
396396
.iter()
397-
.find_map(|(k, _)| {
398-
if k.kind == kind {
399-
let summary = k.pkg.manifest().summary();
400-
401-
Some(format!("{} v{}", summary.name(), summary.version()))
402-
} else {
403-
None
404-
}
405-
})
397+
.find_map(|(u, _)| (unit.kind == kind).then_some(unit.pkg.summary().package_id()))
406398
.unwrap();
407399

408400
anyhow::anyhow!(

0 commit comments

Comments
 (0)