@@ -121,8 +121,7 @@ impl<N: Debug, E: Debug> Graph<N, E> {
121121 }
122122 }
123123
124- ///////////////////////////////////////////////////////////////////////////
125- // Simple accessors
124+ // # Simple accessors
126125
127126 #[ inline]
128127 pub fn all_nodes ( & self ) -> & [ Node < N > ] {
@@ -144,8 +143,7 @@ impl<N: Debug, E: Debug> Graph<N, E> {
144143 self . edges . len ( )
145144 }
146145
147- ///////////////////////////////////////////////////////////////////////////
148- // Node construction
146+ // # Node construction
149147
150148 pub fn next_node_index ( & self ) -> NodeIndex {
151149 NodeIndex ( self . nodes . len ( ) )
@@ -172,8 +170,7 @@ impl<N: Debug, E: Debug> Graph<N, E> {
172170 & self . nodes [ idx. 0 ]
173171 }
174172
175- ///////////////////////////////////////////////////////////////////////////
176- // Edge construction and queries
173+ // # Edge construction and queries
177174
178175 pub fn next_edge_index ( & self ) -> EdgeIndex {
179176 EdgeIndex ( self . edges . len ( ) )
@@ -232,8 +229,7 @@ impl<N: Debug, E: Debug> Graph<N, E> {
232229 self . edges [ edge. 0 ] . next_edge [ dir. repr ]
233230 }
234231
235- ///////////////////////////////////////////////////////////////////////////
236- // Iterating over nodes, edges
232+ // # Iterating over nodes, edges
237233
238234 pub fn each_node < ' a , F > ( & ' a self , mut f : F ) -> bool
239235 where F : FnMut ( NodeIndex , & ' a Node < N > ) -> bool
@@ -274,8 +270,7 @@ impl<N: Debug, E: Debug> Graph<N, E> {
274270 self . incoming_edges ( target) . sources ( )
275271 }
276272
277- ///////////////////////////////////////////////////////////////////////////
278- // Fixed-point iteration
273+ // # Fixed-point iteration
279274 //
280275 // A common use for graphs in our compiler is to perform
281276 // fixed-point iteration. In this case, each edge represents a
@@ -306,8 +301,7 @@ impl<N: Debug, E: Debug> Graph<N, E> {
306301 }
307302}
308303
309- ///////////////////////////////////////////////////////////////////////////
310- // Iterators
304+ // # Iterators
311305
312306pub struct AdjacentEdges < ' g , N , E >
313307 where N : ' g ,
0 commit comments