about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/graph/vec_graph
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_data_structures/src/graph/vec_graph')
-rw-r--r--compiler/rustc_data_structures/src/graph/vec_graph/mod.rs12
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs b/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs
index 79efe3fb8e0..8b75fd9f633 100644
--- a/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs
+++ b/compiler/rustc_data_structures/src/graph/vec_graph/mod.rs
@@ -1,4 +1,4 @@
-use crate::graph::{DirectedGraph, GraphSuccessors, WithNumEdges, WithSuccessors};
+use crate::graph::{DirectedGraph, Successors, WithNumEdges};
 use rustc_index::{Idx, IndexVec};
 
 #[cfg(test)]
@@ -92,14 +92,10 @@ impl<N: Idx> WithNumEdges for VecGraph<N> {
     }
 }
 
-impl<'graph, N: Idx> GraphSuccessors<'graph> for VecGraph<N> {
-    type Item = N;
+impl<N: Idx + Ord> Successors for VecGraph<N> {
+    type Successors<'g> = std::iter::Cloned<std::slice::Iter<'g, N>>;
 
-    type Iter = std::iter::Cloned<std::slice::Iter<'graph, N>>;
-}
-
-impl<N: Idx + Ord> WithSuccessors for VecGraph<N> {
-    fn successors(&self, node: N) -> <Self as GraphSuccessors<'_>>::Iter {
+    fn successors(&self, node: N) -> Self::Successors<'_> {
         self.successors(node).iter().cloned()
     }
 }