summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-10-04 10:05:38 +0300
committerLars Wirzenius <liw@liw.fi>2019-10-04 10:05:38 +0300
commit5e34e8c7ff530201a140afb8bc170e0461762b69 (patch)
tree3564191748235a26960c70bf04eb93a2b5b785be /src
parentb8ca85eb61a362fd95bbc6c5354d881032da12c4 (diff)
downloadroadmap-5e34e8c7ff530201a140afb8bc170e0461762b69.tar.gz
Refactor: simplify logic in is_goal
Diffstat (limited to 'src')
-rw-r--r--src/map.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/map.rs b/src/map.rs
index 979abdb..994633b 100644
--- a/src/map.rs
+++ b/src/map.rs
@@ -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