summaryrefslogtreecommitdiffstats
path: root/src/executor.rs
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2021-09-09 22:37:59 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2021-09-09 22:40:52 +0200
commitff36b092514dcf570be64273def2b87880abedad (patch)
treef65dcaf96dd30f7f422f9a2e7cf36ff950cec79e /src/executor.rs
parent0fa007494b82ad537ad09ce41f4efd10c614d6fc (diff)
downloadrebel-ff36b092514dcf570be64273def2b87880abedad.tar
rebel-ff36b092514dcf570be64273def2b87880abedad.zip
Rename TaskAction to Action
Also use serde's rename_all feature.
Diffstat (limited to 'src/executor.rs')
-rw-r--r--src/executor.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/executor.rs b/src/executor.rs
index f3c5993..f7581bb 100644
--- a/src/executor.rs
+++ b/src/executor.rs
@@ -25,7 +25,7 @@ struct TaskInput<'a> {
pub id: &'a TaskRef,
pub inherit: Option<InputHash>,
pub depends: &'a BTreeSet<OutputHash>,
- pub action: &'a TaskAction,
+ pub action: &'a Action,
}
impl<'a> TaskInput<'a> {
@@ -121,7 +121,7 @@ impl<'a> Executor<'a> {
.collect()
}
- fn task_deps_with_actions(&self, task: &Task) -> HashMap<OutputHash, TaskAction> {
+ fn task_deps_with_actions(&self, task: &Task) -> HashMap<OutputHash, Action> {
task.depends
.iter()
.filter_map(|dep| {
@@ -160,12 +160,12 @@ impl<'a> Executor<'a> {
util::fs::mkdir(&state_dir)?;
let output_hash = match &task_def.action {
- TaskAction::Fetch { .. } => {
+ Action::Fetch { .. } => {
// Fetch tasks are not implemented yet,
// we just return the input hash
Some(OutputHash(input_hash.0))
}
- TaskAction::Run(run) => {
+ Action::Run(run) => {
let task = runner::Task {
id: task_ref.clone(),
run: run.clone(),