Skip to content

Commit 27a5205

Browse files
committedMar 9, 2024
Reformatting
1 parent b0bf413 commit 27a5205

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed
 

‎src/main.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ impl Display for Graph<String, Task>
9595
self.successor_edges.iter().try_for_each(|(from, successors)| {
9696
successors.iter().try_for_each(|to| {
9797
if self.slack(from) == 0 && self.slack(to) == 0 {
98-
9998
writeln!(f, r#" node_{from} -> node_{to} [color="red" penwidth="2"]"#, from = from.replace(".", "_"), to = to.replace(".", "_"))
10099
} else {
101100
writeln!(f, " node_{from} -> node_{to}", from = from.replace(".", "_"), to = to.replace(".", "_"))
@@ -121,10 +120,7 @@ fn main() {
121120
val.connections.iter().for_each(|(from, to)| graph.connect_vertices(from.clone(), to.clone()));
122121

123122
let graph_string = format!("{graph}");
124-
let Ok(dot_graph) = parse(graph_string.as_str()) else {
125-
println!("Something went wrong when parsing your graph. Exiting program...");
126-
return;
127-
};
123+
let dot_graph = parse(graph_string.as_str()).expect("Couldn't parse generated graph");
128124
let graph_png = exec(
129125
dot_graph,
130126
&mut PrinterContext::default(),

0 commit comments

Comments
 (0)
Please sign in to comment.