diff options
Diffstat (limited to 'src/map.rs')
-rw-r--r-- | src/map.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -119,7 +119,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 format_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", @@ -238,7 +238,7 @@ blocked: fn empty_dot() { let roadmap = Roadmap::new(); assert_eq!( - roadmap.as_dot(999).unwrap(), + roadmap.format_as_dot(999).unwrap(), "digraph \"roadmap\" { } " @@ -256,7 +256,7 @@ blocked: roadmap.add_step(first); roadmap.add_step(second); assert_eq!( - roadmap.as_dot(999).unwrap(), + roadmap.format_as_dot(999).unwrap(), "digraph \"roadmap\" { first [label=\"\" style=filled fillcolor=\"#ffffff\" shape=\"ellipse\"]; second [label=\"\" style=filled fillcolor=\"#00eeee\" shape=\"diamond\"]; |