From b9f50e432eb2fe0f1276bb69c053bb9a7368675a Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 27 Jul 2017 19:39:18 -0500 Subject: make task.$T.path mandatory --- macros/src/check.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'macros/src/check.rs') diff --git a/macros/src/check.rs b/macros/src/check.rs index e4a716b..42dd3c9 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, + pub path: Path, pub priority: u8, pub resources: Idents, } @@ -122,7 +122,7 @@ fn task(name: &str, task: syntax::check::Task) -> Result { Ok(Task { kind, - path: task.path, + path: task.path.ok_or("`path` field is missing")?, priority: task.priority.unwrap_or(1), resources: task.resources, }) -- cgit v1.2.3