summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-01-21 16:07:28 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-01-21 16:07:28 +0100
commit087ff5c8bd0b7364101580e9be3069ef40ce91b1 (patch)
tree1f34322ab0a2ebc599f49e6067528431f14d3e8e /src
parente8a4c12a49b5f41778668ba1f5e71de629b6bc20 (diff)
Fix clippy: Do not clone() copy type
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src')
-rw-r--r--src/job/runnable.rs2
-rw-r--r--src/job/tree.rs2
-rw-r--r--src/orchestrator/orchestrator.rs5
3 files changed, 4 insertions, 5 deletions
diff --git a/src/job/runnable.rs b/src/job/runnable.rs
index a7ddb52..7bfabae 100644
--- a/src/job/runnable.rs
+++ b/src/job/runnable.rs
@@ -101,7 +101,7 @@ impl RunnableJob {
)?;
Ok(RunnableJob {
- uuid: job.uuid.clone(),
+ uuid: job.uuid,
package: job.package.clone(),
image: job.image.clone(),
resources,
diff --git a/src/job/tree.rs b/src/job/tree.rs
index 883d93e..d7c0751 100644
--- a/src/job/tree.rs
+++ b/src/job/tree.rs
@@ -59,7 +59,7 @@ impl Tree {
phases.clone(),
resources.clone());
- let job_uuid = job.uuid().clone();
+ let job_uuid = *job.uuid();
let jdef = JobDefinition { job, dependencies: deps_uuids };
tree.insert(job_uuid, jdef);
diff --git a/src/orchestrator/orchestrator.rs b/src/orchestrator/orchestrator.rs
index 135e10c..e637f36 100644
--- a/src/orchestrator/orchestrator.rs
+++ b/src/orchestrator/orchestrator.rs
@@ -131,8 +131,7 @@ impl<'a> Orchestrator<'a> {
.map(|(uuid, jobdef)| {
trace!("Running job {}", uuid);
let bar = multibar.add(self.progress_generator.bar());
- let uuid = uuid.clone();
- self.run_job(jobdef, bar).map(move |r| (uuid, r))
+ self.run_job(jobdef, bar).map(move |r| (*uuid, r))
})
.collect::<futures::stream::FuturesUnordered<_>>()
.collect::<Vec<(_, Result<JobResult>)>>();
@@ -181,7 +180,7 @@ impl<'a> Orchestrator<'a> {
.await?;
bar.set_message("Scheduling...");
- let job_uuid = jobdef.job.uuid().clone();
+ let job_uuid = *jobdef.job.uuid();
match self.scheduler.schedule_job(runnable, bar).await?.run().await {
Err(e) => return Ok(Err((job_uuid, e))),
Ok(db_artifacts) => {