summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-09-28 19:03:35 +0300
committerLars Wirzenius <liw@liw.fi>2019-09-28 19:03:35 +0300
commit83a94bb17868515858b3849a55ef837ea504e81f (patch)
treef4d68727e65725069feab3ae6717929c08ce9653 /src
parent8ddbef2bf73b265f174e8fda5aebef8dc216a60a (diff)
downloadroadmap-83a94bb17868515858b3849a55ef837ea504e81f.tar.gz
Change: roadmap
Diffstat (limited to 'src')
-rw-r--r--src/roadmap.rs5
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",
}
}