diff options
| author | bors <bors@rust-lang.org> | 2022-12-28 11:45:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-12-28 11:45:18 +0000 |
| commit | fba3d79df09780a9529db09086810759f6dc60ad (patch) | |
| tree | d144e547bd772161bc685fa36af5e9ff87c4883b | |
| parent | fbdf926e7010f8bdd9e773831ecf5dbda058bd21 (diff) | |
| parent | 041ad1fcfe62615a67461bb2076d0ebff026bf77 (diff) | |
| download | rust-fba3d79df09780a9529db09086810759f6dc60ad.tar.gz rust-fba3d79df09780a9529db09086810759f6dc60ad.zip | |
Auto merge of #2743 - RalfJung:path-join, r=RalfJung
simplify path joining code a bit
| -rw-r--r-- | src/tools/miri/cargo-miri/src/phases.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/tools/miri/cargo-miri/src/phases.rs b/src/tools/miri/cargo-miri/src/phases.rs index 2a469d324e8..e51bfa3798f 100644 --- a/src/tools/miri/cargo-miri/src/phases.rs +++ b/src/tools/miri/cargo-miri/src/phases.rs @@ -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() } } |
