diff options
author | Lars Wirzenius <liw@liw.fi> | 2019-09-28 19:03:35 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2019-09-28 19:03:35 +0300 |
commit | 83a94bb17868515858b3849a55ef837ea504e81f (patch) | |
tree | f4d68727e65725069feab3ae6717929c08ce9653 /src | |
parent | 8ddbef2bf73b265f174e8fda5aebef8dc216a60a (diff) | |
download | roadmap-83a94bb17868515858b3849a55ef837ea504e81f.tar.gz |
Change: roadmap
Diffstat (limited to 'src')
-rw-r--r-- | src/roadmap.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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<Step>, } @@ -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<String, Box<dyn std::error::Error>> { + pub fn as_dot(&self, label_width: usize) -> Result<String, Box<dyn std::error::Error>> { 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", } } |