Cleaner (?) API for unweighted graphs: graph.add_edge((src, dst)) instead of graph.add_edge(src, dst, ()).
Disadvantages:
Worse documentation? add_edge(&mut self, src: VertexIndex, dst: VertexIndex, edge: E) is much clearer than add_edge<T: IntoEdge<VertexIndex, E, Ty>>(&mut self, edge: T).
Potential problems with type inference. Especially in case of encapsulations where we don't use G::VertexIndex directly, but VI: Borrow<G::VertexIndex> instead.
In summary, I am not much in favor of this change, but just wanted to leave a note if I change the opinion and the disadvantages will turn out not that bad.
Advantages:
graph.add_edge((src, dst))
instead ofgraph.add_edge(src, dst, ())
.Disadvantages:
add_edge(&mut self, src: VertexIndex, dst: VertexIndex, edge: E)
is much clearer thanadd_edge<T: IntoEdge<VertexIndex, E, Ty>>(&mut self, edge: T)
.G::VertexIndex
directly, butVI: Borrow<G::VertexIndex>
instead.In summary, I am not much in favor of this change, but just wanted to leave a note if I change the opinion and the disadvantages will turn out not that bad.