aboutsummaryrefslogtreecommitdiff
path: root/macros/src/check.rs
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2017-07-27 19:39:18 -0500
committerGravatar Jorge Aparicio <jorge@japaric.io> 2017-07-27 19:39:18 -0500
commitb9f50e432eb2fe0f1276bb69c053bb9a7368675a (patch)
tree90652ba4295975adb7475fb4108fca81d0003ab2 /macros/src/check.rs
parentd396da59502ef67f624bb4d8927ff8697232f66c (diff)
downloadrtic-b9f50e432eb2fe0f1276bb69c053bb9a7368675a.tar.gz
rtic-b9f50e432eb2fe0f1276bb69c053bb9a7368675a.tar.zst
rtic-b9f50e432eb2fe0f1276bb69c053bb9a7368675a.zip
make task.$T.path mandatory
Diffstat (limited to 'macros/src/check.rs')
-rw-r--r--macros/src/check.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/macros/src/check.rs b/macros/src/check.rs
index e4a716bc..42dd3c9e 100644
--- a/macros/src/check.rs
+++ b/macros/src/check.rs
@@ -49,7 +49,7 @@ pub enum Kind {
pub struct Task {
pub kind: Kind,
- pub path: Option<Path>,
+ pub path: Path,
pub priority: u8,
pub resources: Idents,
}
@@ -122,7 +122,7 @@ fn task(name: &str, task: syntax::check::Task) -> Result<Task> {
Ok(Task {
kind,
- path: task.path,
+ path: task.path.ok_or("`path` field is missing")?,
priority: task.priority.unwrap_or(1),
resources: task.resources,
})