diff options
| author | Ralf Jung <post@ralfj.de> | 2022-12-28 12:44:41 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2022-12-28 12:44:41 +0100 |
| commit | 041ad1fcfe62615a67461bb2076d0ebff026bf77 (patch) | |
| tree | d144e547bd772161bc685fa36af5e9ff87c4883b /src | |
| parent | fbdf926e7010f8bdd9e773831ecf5dbda058bd21 (diff) | |
| download | rust-041ad1fcfe62615a67461bb2076d0ebff026bf77.tar.gz rust-041ad1fcfe62615a67461bb2076d0ebff026bf77.zip | |
simplify path joining code a bit
Diffstat (limited to 'src')
| -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() } } |
