From 83a94bb17868515858b3849a55ef837ea504e81f Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 28 Sep 2019 19:03:35 +0300 Subject: Change: roadmap --- legend.svg | 104 ++++++++++++++++++++++++++++----------------------------- src/roadmap.rs | 5 +-- 2 files changed, 55 insertions(+), 54 deletions(-) diff --git a/legend.svg b/legend.svg index 6c74a42..a7856d6 100644 --- a/legend.svg +++ b/legend.svg @@ -4,75 +4,75 @@ - + roadmap - - + + -ready - -This task is ready -to be done: it is not -blocked by anything +next + +This task is chosen +to be done next - -blocked - -This task is blocked -and can't be done until -something happens - - - -ready->blocked - - - - - -goal - -This is the end goal: -if we reach here, there -is nothing more to be -done in the project - - - -blocked->goal - - - - -next - -This task is chosen -to be done next +blocked + +This task is blocked +and can't be done until +something happens next->blocked - - + + - + finished - -This task is finished; -the arrow indicates what -follows this task (unless -it's blocked) + +This task is finished; +the arrow indicates what +follows this task (unless +it's blocked) + + + +goal + +This is the end goal: +if we reach here, there +is nothing more to be +done in the project finished->goal - - + + + + + +blocked->goal + + + + + +ready + +This task is ready +to be done: it is not +blocked by anything + + + +ready->blocked + + diff --git a/src/roadmap.rs b/src/roadmap.rs index c043e1f..19fd337 100644 --- a/src/roadmap.rs +++ b/src/roadmap.rs @@ -5,6 +5,7 @@ pub use crate::Status; pub use crate::Step; /// All the steps to get to the end goal. +#[derive(Clone)] pub struct Roadmap { steps: Vec, } @@ -131,7 +132,7 @@ impl Roadmap { /// Get a Graphviz dot language representation of a roadmap. This /// is the textual representation, and the caller needs to use the /// Graphviz dot(1) tool to create an image from it. - pub fn as_dot(self, label_width: usize) -> Result> { + pub fn as_dot(&self, label_width: usize) -> Result> { let labels = self.steps.iter().map(|step| { format!( "{} [label=\"{}\" style=filled fillcolor=\"{}\" shape=\"{}\"];\n", @@ -167,7 +168,7 @@ impl Roadmap { Status::Ready => "#ffffff", Status::Next => "#0cc00", Status::Goal => "#00eeee", - Status::Unknown => "#rr0000", + Status::Unknown => "#ff0000", } } -- cgit v1.2.1