diff options
-rw-r--r-- | src/map.rs | 4 | ||||
-rw-r--r-- | src/status.rs | 2 | ||||
-rw-r--r-- | src/step.rs | 4 |
3 files changed, 5 insertions, 5 deletions
@@ -98,13 +98,13 @@ impl Roadmap { } // Return vector of all statuses of all dependencies - fn dep_statuses(&self, step: &Step) -> Vec<&Status> { + fn dep_statuses(&self, step: &Step) -> Vec<Status> { step.dependencies() .map(|depname| { if let Some(step) = self.get_step(depname) { step.status() } else { - &Status::Unknown + Status::Unknown } }) .collect() diff --git a/src/status.rs b/src/status.rs index e6bac17..2edfbd1 100644 --- a/src/status.rs +++ b/src/status.rs @@ -5,7 +5,7 @@ /// example, a step is inferred to be blocked if any of it /// dependencies are not finished. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq)] pub enum Status { Unknown, Goal, diff --git a/src/step.rs b/src/step.rs index e8d9117..aae69ff 100644 --- a/src/step.rs +++ b/src/step.rs @@ -35,8 +35,8 @@ impl Step { } /// Return the status of a step. - pub fn status<'a>(&'a self) -> &Status { - &self.status + pub fn status<'a>(&'a self) -> Status { + self.status } /// Set the status of a step. |