simplify path joining code a bit

This commit is contained in:
Ralf Jung 2022-12-28 12:44:41 +01:00
parent fbdf926e70
commit 041ad1fcfe

View file

@ -265,15 +265,7 @@ pub fn phase_rustc(mut args: impl Iterator<Item = String>, phase: RustcPhase) {
);
let output =
String::from_utf8(output.stdout).expect("rustc returned non-UTF-8 filename");
output
.lines()
.filter(|l| !l.is_empty())
.map(|l| {
let mut p = path.clone();
p.push(l);
p
})
.collect()
output.lines().filter(|l| !l.is_empty()).map(|l| path.join(l)).collect()
}
}