diff options
author | Lars Wirzenius <liw@liw.fi> | 2019-10-04 11:13:21 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2019-10-04 11:13:21 +0300 |
commit | c234660420250c03f514791e854c59e6e8432410 (patch) | |
tree | 54140c8361393749f20badfde26475aa1e2647fe | |
parent | b1574e3bcc1135ba513521ed76796a31895afc34 (diff) | |
download | roadmap-c234660420250c03f514791e854c59e6e8432410.tar.gz |
Change: rustfmt
-rw-r--r-- | src/map.rs | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -4,16 +4,14 @@ pub use crate::from_yaml; pub use crate::Status; pub use crate::Step; - /// Error in Roadmap, from parsing or otherwise. pub type RoadmapError<T> = Result<T, String>; - /// Represent a full project roadmap. /// /// This stores all the steps needed to reach the end goal. See the /// crate leve documentation for an example. -#[derive(Clone,Debug)] +#[derive(Clone, Debug)] pub struct Roadmap { steps: Vec<Step>, } @@ -28,14 +26,11 @@ impl Roadmap { /// Count number of steps that nothing depends on. pub fn count_goals(&self) -> usize { - self.steps - .iter() - .filter(|step| self.is_goal(step)) - .count() + self.steps.iter().filter(|step| self.is_goal(step)).count() } /// Iterate over step names. - pub fn step_names(&self) -> impl Iterator<Item=&str> { + pub fn step_names(&self) -> impl Iterator<Item = &str> { self.steps.iter().map(|step| step.name()) } @@ -121,7 +116,6 @@ impl Roadmap { self.steps.iter().all(|other| !other.depends_on(&step)) } - // Validate that the parsed, constructed roadmap is valid. pub fn validate(&self) -> RoadmapError<()> { // Is there exactly one goal? |