about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc_data_structures/graph/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/librustc_data_structures/graph/mod.rs b/src/librustc_data_structures/graph/mod.rs
index d73043c0430..4a3810c822b 100644
--- a/src/librustc_data_structures/graph/mod.rs
+++ b/src/librustc_data_structures/graph/mod.rs
@@ -120,10 +120,20 @@ impl<N:Debug,E:Debug> Graph<N,E> {
     }
 
     #[inline]
+    pub fn len_nodes(&self) -> usize {
+        self.nodes.len()
+    }
+
+    #[inline]
     pub fn all_edges<'a>(&'a self) -> &'a [Edge<E>] {
         &self.edges
     }
 
+    #[inline]
+    pub fn len_edges(&self) -> usize {
+        self.edges.len()
+    }
+
     ///////////////////////////////////////////////////////////////////////////
     // Node construction