-
Notifications
You must be signed in to change notification settings - Fork 430
Closed
Milestone
Description
The example on docs.rs states that the output of the last println! is supposed to be:
graph {
0 [label="\"0\""]
1 [label="\"0\""]
2 [label="\"0\""]
3 [label="\"0\""]
1 -- 2
3 -- 4
2 -- 3
}
However, it actually is:
graph {
0 [ label = "0" ]
1 [ label = "0" ]
2 [ label = "0" ]
3 [ label = "0" ]
4 [ label = "0" ]
1 -- 2 [ ]
3 -- 4 [ ]
2 -- 3 [ ]
}
This highlights pretty well, one of the reasons why I find the example confusing. Using from_edges in the beginning starting with 1 as the lowest index creates a 0 node which does nothing. Hence I would suggest changing the example slightly and shift the indices of the nodes in the example.
Metadata
Metadata
Assignees
Labels
No labels