diff options
author | Lars Wirzenius <liw@liw.fi> | 2019-10-04 10:05:38 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2019-10-04 10:05:38 +0300 |
commit | 5e34e8c7ff530201a140afb8bc170e0461762b69 (patch) | |
tree | 3564191748235a26960c70bf04eb93a2b5b785be | |
parent | b8ca85eb61a362fd95bbc6c5354d881032da12c4 (diff) | |
download | roadmap-5e34e8c7ff530201a140afb8bc170e0461762b69.tar.gz |
Refactor: simplify logic in is_goal
-rw-r--r-- | src/map.rs | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -113,8 +113,7 @@ impl Roadmap { /// Should status be goal? In other words, does any other step /// depend on this one? pub fn is_goal(&self, step: &Step) -> bool { - let has_parent = self.steps.iter().any(|other| other.depends_on(step.name())); - !has_parent + self.steps.iter().all(|other| !other.depends_on(step.name())) } /// Get a Graphviz dot language representation of a roadmap. This |