diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-03-01 10:48:45 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-03-01 17:42:26 +0100 |
commit | 18d06cc867fb3c7c10b7494b96d213aa62fa9927 (patch) | |
tree | fcd80484010c40dba60f3e4fbceb6f9c0962bd51 /src/endpoint | |
parent | 613f1578f79f0572b859e5518672ab701417f5b9 (diff) |
Refactor: Environment variable aggregation
This patch refactors the collecting of the environment variables in the
`RunnableJob::build_from_job()` implementation as well as in the
`RunnableJob::environemtn()` implementation.
This results in fewer allocations, especially but not only because the
`RunnableJob::environment()` function returns an iterator now and all clone()
calls were removed.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/endpoint')
-rw-r--r-- | src/endpoint/configured.rs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/endpoint/configured.rs b/src/endpoint/configured.rs index d7673c0..311e0a6 100644 --- a/src/endpoint/configured.rs +++ b/src/endpoint/configured.rs @@ -304,7 +304,6 @@ impl<'a> PreparedContainer<'a> { ) -> Result<shiplift::rep::ContainerCreateInfo> { let envs = job .environment() - .into_iter() .map(|(k, v)| format!("{}={}", k.as_ref(), v)) .collect::<Vec<_>>(); trace!("Job resources: Environment variables = {:?}", envs); |