Use where clasues and only where clauses for bounds in the
iterators for Graph.
The rest of the code uses bounds on the generic declarations for
Debug, and we may want to change those to for consistency. I did
not do that here because I don't know whether or not that's a good
idea. But for the iterators, they were inconsistent causing
confusion, at least for me.
}
}
-pub struct AdjacentTargets<'g, N: 'g, E: 'g>
+pub struct AdjacentTargets<'g, N, E>
where N: 'g,
E: 'g
{
}
}
-pub struct AdjacentSources<'g, N: 'g, E: 'g>
+pub struct AdjacentSources<'g, N, E>
where N: 'g,
E: 'g
{
}
}
-pub struct DepthFirstTraversal<'g, N: 'g, E: 'g> {
+pub struct DepthFirstTraversal<'g, N, E>
+ where N: 'g,
+ E: 'g
+{
graph: &'g Graph<N, E>,
stack: Vec<NodeIndex>,
visited: BitVector,