Use RPITIT for Successors and Predecessors traits

Now with RPITIT instead of GAT!
This commit is contained in:
Maybe Waffle
2024-04-15 13:33:08 +00:00
parent e8d2221e3b
commit 435db9b9bd
8 changed files with 14 additions and 46 deletions

View File

@@ -104,9 +104,7 @@ impl<N: Idx, S: Idx + Ord> NumEdges for Sccs<N, S> {
}
impl<N: Idx, S: Idx + Ord> Successors for Sccs<N, S> {
type Successors<'g> = std::iter::Cloned<std::slice::Iter<'g, S>>;
fn successors(&self, node: S) -> Self::Successors<'_> {
fn successors(&self, node: S) -> impl Iterator<Item = Self::Node> {
self.successors(node).iter().cloned()
}
}