summaryrefslogtreecommitdiffstats
path: root/src/executor.rs
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2021-09-18 18:26:53 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2021-09-18 18:26:53 +0200
commit244ada073fa728f2d5fd49de681163cb145308b1 (patch)
tree72b010471036fff1d0fa2258235d242635ed6c4b /src/executor.rs
parent667769d0afc009b15da5c00be3e603ec44301287 (diff)
downloadrebel-244ada073fa728f2d5fd49de681163cb145308b1.tar
rebel-244ada073fa728f2d5fd49de681163cb145308b1.zip
executor: use reference for inherit hash in TaskInput
Diffstat (limited to 'src/executor.rs')
-rw-r--r--src/executor.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/executor.rs b/src/executor.rs
index ab88701..145176c 100644
--- a/src/executor.rs
+++ b/src/executor.rs
@@ -23,7 +23,7 @@ const TASK_ENV: &[(&str, &str)] = &[
#[derive(Clone, Debug, Serialize)]
struct TaskInput<'a> {
pub id: &'a TaskRef,
- pub inherit: Option<InputHash>,
+ pub inherit: Option<&'a InputHash>,
pub depends: &'a HashMap<DependencyHash, Dependency>,
pub output: &'a HashMap<String, String>,
pub run: &'a str,
@@ -169,7 +169,7 @@ impl<'a> Executor<'a> {
let inherit_meta = &self.tasks_done[inherit_task];
let mut inherit_chain = inherit_meta.inherit.clone();
inherit_chain.push(inherit_meta.input_hash);
- (inherit_chain, Some(inherit_meta.input_hash))
+ (inherit_chain, Some(&inherit_meta.input_hash))
} else {
(Vec::new(), None)
};