From c234660420250c03f514791e854c59e6e8432410 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 4 Oct 2019 11:13:21 +0300 Subject: Change: rustfmt --- src/map.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/map.rs b/src/map.rs index 0184fc1..1f693ac 100644 --- a/src/map.rs +++ b/src/map.rs @@ -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 = Result; - /// 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, } @@ -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 { + pub fn step_names(&self) -> impl Iterator { 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? -- cgit v1.2.1