summaryrefslogtreecommitdiffstats
path: root/src/executor.rs
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2021-09-11 12:13:55 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2021-09-11 12:13:55 +0200
commit2e7fae2d68bef1a350307a3c2c2fe9003d97dc40 (patch)
tree21bff29fc2272a0c2748a5dee54a12b10cba8af0 /src/executor.rs
parentc462125ae8695f08a031ab2873512104e1a810e1 (diff)
downloadrebel-2e7fae2d68bef1a350307a3c2c2fe9003d97dc40.tar
rebel-2e7fae2d68bef1a350307a3c2c2fe9003d97dc40.zip
Replace more DirBuilder uses with util::fs::mkdir
Diffstat (limited to 'src/executor.rs')
-rw-r--r--src/executor.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/executor.rs b/src/executor.rs
index ff36646..98821db 100644
--- a/src/executor.rs
+++ b/src/executor.rs
@@ -1,7 +1,4 @@
-use std::{
- collections::{HashMap, HashSet},
- fs, io,
-};
+use std::collections::{HashMap, HashSet};
use serde::{Deserialize, Serialize};
@@ -71,7 +68,7 @@ pub struct Executor<'a> {
}
impl<'a> Executor<'a> {
- pub fn new(tasks: &'a TaskMap, taskset: HashSet<TaskRef>) -> io::Result<Self> {
+ pub fn new(tasks: &'a TaskMap, taskset: HashSet<TaskRef>) -> Result<Self> {
let env: HashMap<String, String> = TASK_ENV
.iter()
.map(|(k, v)| (k.to_string(), v.to_string()))
@@ -100,9 +97,7 @@ impl<'a> Executor<'a> {
}
}
- let mut dir = fs::DirBuilder::new();
- dir.recursive(true);
- dir.create(paths::TASK_STATE_DIR)?;
+ util::fs::mkdir(paths::TASK_STATE_DIR)?;
Ok(exc)
}