about summary refs log tree commit diff
path: root/src/librustc_data_structures/graph/vec_graph/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/librustc_data_structures/graph/vec_graph/mod.rs')
-rw-r--r--src/librustc_data_structures/graph/vec_graph/mod.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/librustc_data_structures/graph/vec_graph/mod.rs b/src/librustc_data_structures/graph/vec_graph/mod.rs
index aad5944dcd0..22c50afe6d0 100644
--- a/src/librustc_data_structures/graph/vec_graph/mod.rs
+++ b/src/librustc_data_structures/graph/vec_graph/mod.rs
@@ -1,5 +1,5 @@
+use crate::graph::{DirectedGraph, GraphSuccessors, WithNumEdges, WithNumNodes, WithSuccessors};
 use rustc_index::vec::{Idx, IndexVec};
-use crate::graph::{DirectedGraph, WithNumNodes, WithNumEdges, WithSuccessors, GraphSuccessors};
 
 #[cfg(test)]
 mod tests;
@@ -18,10 +18,7 @@ pub struct VecGraph<N: Idx> {
 }
 
 impl<N: Idx> VecGraph<N> {
-    pub fn new(
-        num_nodes: usize,
-        mut edge_pairs: Vec<(N, N)>,
-    ) -> Self {
+    pub fn new(num_nodes: usize, mut edge_pairs: Vec<(N, N)>) -> Self {
         // Sort the edges by the source -- this is important.
         edge_pairs.sort();
 
@@ -104,10 +101,7 @@ impl<N: Idx> GraphSuccessors<'graph> for VecGraph<N> {
 }
 
 impl<N: Idx> WithSuccessors for VecGraph<N> {
-    fn successors<'graph>(
-        &'graph self,
-        node: N
-    ) -> <Self as GraphSuccessors<'graph>>::Iter {
+    fn successors<'graph>(&'graph self, node: N) -> <Self as GraphSuccessors<'graph>>::Iter {
         self.successors(node).iter().cloned()
     }
 }