summaryrefslogtreecommitdiffstats
path: root/src/types.rs
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2021-09-25 13:21:21 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2021-09-25 13:21:21 +0200
commit5e3b1c8fdb5886cd75dc52a2631949ab3dca5a16 (patch)
tree2062a25d18665613ed65b1b5487cd1dd424ae850 /src/types.rs
parent07530f2233d24203d776b5b133060eda7572c101 (diff)
downloadrebel-5e3b1c8fdb5886cd75dc52a2631949ab3dca5a16.tar
rebel-5e3b1c8fdb5886cd75dc52a2631949ab3dca5a16.zip
Add recipe and task to TaskID as separate fields
Diffstat (limited to 'src/types.rs')
-rw-r--r--src/types.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/types.rs b/src/types.rs
index d831aa3..51b9420 100644
--- a/src/types.rs
+++ b/src/types.rs
@@ -60,11 +60,14 @@ pub type ArchiveHasher = Sha256;
stringhash_newtype!(ArchiveHash);
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, Hash)]
-pub struct TaskID(pub String);
+pub struct TaskID {
+ pub recipe: String,
+ pub task: String,
+}
impl Display for TaskID {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- self.0.fmt(f)
+ write!(f, "{}:{}", self.recipe, self.task)
}
}