@@ -525,7 +525,7 @@ where
525525 /// not borrow from the graph.
526526 ///
527527 /// [1]: struct.Neighbors.html#method.detach
528- pub fn neighbors ( & self , a : NodeIndex < Ix > ) -> Neighbors < E , Ix > {
528+ pub fn neighbors ( & self , a : NodeIndex < Ix > ) -> Neighbors < ' _ , E , Ix > {
529529 self . neighbors_directed ( a, Outgoing )
530530 }
531531
@@ -546,7 +546,7 @@ where
546546 /// not borrow from the graph.
547547 ///
548548 /// [1]: struct.Neighbors.html#method.detach
549- pub fn neighbors_directed ( & self , a : NodeIndex < Ix > , dir : Direction ) -> Neighbors < E , Ix > {
549+ pub fn neighbors_directed ( & self , a : NodeIndex < Ix > , dir : Direction ) -> Neighbors < ' _ , E , Ix > {
550550 let mut iter = self . neighbors_undirected ( a) ;
551551 let k = dir. index ( ) ;
552552 iter. next [ 1 - k] = EdgeIndex :: end ( ) ;
@@ -567,7 +567,7 @@ where
567567 /// not borrow from the graph.
568568 ///
569569 /// [1]: struct.Neighbors.html#method.detach
570- pub fn neighbors_undirected ( & self , a : NodeIndex < Ix > ) -> Neighbors < E , Ix > {
570+ pub fn neighbors_undirected ( & self , a : NodeIndex < Ix > ) -> Neighbors < ' _ , E , Ix > {
571571 Neighbors {
572572 skip_start : a,
573573 edges : & self . edges ,
@@ -589,7 +589,7 @@ where
589589 /// just the nodes without edges.
590590 ///
591591 /// The whole iteration computes in **O(|V|)** time where V is the set of nodes.
592- pub fn externals ( & self , dir : Direction ) -> Externals < N , Ix > {
592+ pub fn externals ( & self , dir : Direction ) -> Externals < ' _ , N , Ix > {
593593 Externals {
594594 iter : self . nodes . iter ( ) . enumerate ( ) ,
595595 dir,
@@ -607,7 +607,7 @@ where
607607 /// Create an iterator over all edges, in indexed order.
608608 ///
609609 /// Iterator element type is `EdgeReference<E, Ix>`.
610- pub fn edge_references ( & self ) -> EdgeReferences < E , Ix > {
610+ pub fn edge_references ( & self ) -> EdgeReferences < ' _ , E , Ix > {
611611 EdgeReferences {
612612 iter : self . edges . iter ( ) . enumerate ( ) ,
613613 }
@@ -691,29 +691,6 @@ where
691691 clone_fields ! ( Neighbors , skip_start, edges, next, ) ;
692692}
693693
694- /// A “walker” object that can be used to step through the edge list of a node.
695- ///
696- /// Created with [`.detach()`](struct.Neighbors.html#method.detach).
697- ///
698- /// The walker does not borrow from the graph, so it lets you step through
699- /// neighbors or incident edges while also mutating graph weights.
700- pub struct WalkNeighbors < Ix > {
701- skip_start : NodeIndex < Ix > ,
702- next : [ EdgeIndex < Ix > ; 2 ] ,
703- }
704-
705- impl < Ix > Clone for WalkNeighbors < Ix >
706- where
707- Ix : IndexType ,
708- {
709- fn clone ( & self ) -> Self {
710- WalkNeighbors {
711- skip_start : self . skip_start ,
712- next : self . next ,
713- }
714- }
715- }
716-
717694/// Iterator over the node indices of a graph.
718695#[ derive( Clone , Debug ) ]
719696pub struct NodeIndices < Ix = DefaultIx > {
0 commit comments