From 83a94bb17868515858b3849a55ef837ea504e81f Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 28 Sep 2019 19:03:35 +0300 Subject: Change: roadmap --- src/roadmap.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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