diff options
| author | KaDiWa <kalle.wachsmuth@gmail.com> | 2022-08-13 15:50:01 +0200 |
|---|---|---|
| committer | KaDiWa <kalle.wachsmuth@gmail.com> | 2022-08-13 16:16:52 +0200 |
| commit | 4eebcb9910c1180791b0e5dba5b3192d0e0046a4 (patch) | |
| tree | cea770766afe0e4492d81cac7b22f516ad95cd4f /src/tools/compiletest | |
| parent | 75b7e52e92c3b00fc891b47f5b2efdff0a2be55a (diff) | |
| download | rust-4eebcb9910c1180791b0e5dba5b3192d0e0046a4.tar.gz rust-4eebcb9910c1180791b0e5dba5b3192d0e0046a4.zip | |
avoid cloning and then iterating
Diffstat (limited to 'src/tools/compiletest')
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 47f2a2d3482..6bd41a50a6d 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1702,7 +1702,7 @@ impl<'test> TestCx<'test> { fn compose_and_run_compiler(&self, mut rustc: Command, input: Option<String>) -> ProcRes { let aux_dir = self.build_all_auxiliary(&mut rustc); - self.props.unset_rustc_env.clone().iter().fold(&mut rustc, |rustc, v| rustc.env_remove(v)); + self.props.unset_rustc_env.iter().fold(&mut rustc, Command::env_remove); rustc.envs(self.props.rustc_env.clone()); self.compose_and_run( rustc, |
