summaryrefslogtreecommitdiff
path: root/src/roadmap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/roadmap.rs')
-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",
}
}