@@ -48,15 +48,15 @@ struct Node<T> {
4848
4949/// Double-ended DList iterator
5050#[ deriving( Clone ) ]
51- pub struct DListIterator < ' self , T > {
52- priv head : & ' self Link < T > ,
51+ pub struct DListIterator < ' a , T > {
52+ priv head : & ' a Link < T > ,
5353 priv tail : Rawlink < Node < T > > ,
5454 priv nelem : uint ,
5555}
5656
5757/// Double-ended mutable DList iterator
58- pub struct MutDListIterator < ' self , T > {
59- priv list : & ' self mut DList < T > ,
58+ pub struct MutDListIterator < ' a , T > {
59+ priv list : & ' a mut DList < T > ,
6060 priv head : Rawlink < Node < T > > ,
6161 priv tail : Rawlink < Node < T > > ,
6262 priv nelem : uint ,
@@ -439,9 +439,9 @@ impl<T> Drop for DList<T> {
439439}
440440
441441
442- impl < ' self , A > Iterator < & ' self A > for DListIterator < ' self , A > {
442+ impl < ' a , A > Iterator < & ' a A > for DListIterator < ' a , A > {
443443 #[ inline]
444- fn next ( & mut self ) -> Option < & ' self A > {
444+ fn next ( & mut self ) -> Option < & ' a A > {
445445 if self . nelem == 0 {
446446 return None ;
447447 }
@@ -458,9 +458,9 @@ impl<'self, A> Iterator<&'self A> for DListIterator<'self, A> {
458458 }
459459}
460460
461- impl < ' self , A > DoubleEndedIterator < & ' self A > for DListIterator < ' self , A > {
461+ impl < ' a , A > DoubleEndedIterator < & ' a A > for DListIterator < ' a , A > {
462462 #[ inline]
463- fn next_back ( & mut self ) -> Option < & ' self A > {
463+ fn next_back ( & mut self ) -> Option < & ' a A > {
464464 if self . nelem == 0 {
465465 return None ;
466466 }
@@ -473,11 +473,11 @@ impl<'self, A> DoubleEndedIterator<&'self A> for DListIterator<'self, A> {
473473 }
474474}
475475
476- impl < ' self , A > ExactSize < & ' self A > for DListIterator < ' self , A > { }
476+ impl < ' a , A > ExactSize < & ' a A > for DListIterator < ' a , A > { }
477477
478- impl < ' self , A > Iterator < & ' self mut A > for MutDListIterator < ' self , A > {
478+ impl < ' a , A > Iterator < & ' a mut A > for MutDListIterator < ' a , A > {
479479 #[ inline]
480- fn next ( & mut self ) -> Option < & ' self mut A > {
480+ fn next ( & mut self ) -> Option < & ' a mut A > {
481481 if self . nelem == 0 {
482482 return None ;
483483 }
@@ -497,9 +497,9 @@ impl<'self, A> Iterator<&'self mut A> for MutDListIterator<'self, A> {
497497 }
498498}
499499
500- impl < ' self , A > DoubleEndedIterator < & ' self mut A > for MutDListIterator < ' self , A > {
500+ impl < ' a , A > DoubleEndedIterator < & ' a mut A > for MutDListIterator < ' a , A > {
501501 #[ inline]
502- fn next_back ( & mut self ) -> Option < & ' self mut A > {
502+ fn next_back ( & mut self ) -> Option < & ' a mut A > {
503503 if self . nelem == 0 {
504504 return None ;
505505 }
@@ -511,7 +511,7 @@ impl<'self, A> DoubleEndedIterator<&'self mut A> for MutDListIterator<'self, A>
511511 }
512512}
513513
514- impl < ' self , A > ExactSize < & ' self mut A > for MutDListIterator < ' self , A > { }
514+ impl < ' a , A > ExactSize < & ' a mut A > for MutDListIterator < ' a , A > { }
515515
516516/// Allow mutating the DList while iterating
517517pub trait ListInsertion < A > {
@@ -525,7 +525,7 @@ pub trait ListInsertion<A> {
525525}
526526
527527// private methods for MutDListIterator
528- impl < ' self , A > MutDListIterator < ' self , A > {
528+ impl < ' a , A > MutDListIterator < ' a , A > {
529529 fn insert_next_node ( & mut self , mut ins_node : ~Node < A > ) {
530530 // Insert before `self.head` so that it is between the
531531 // previously yielded element and self.head.
@@ -547,7 +547,7 @@ impl<'self, A> MutDListIterator<'self, A> {
547547 }
548548}
549549
550- impl < ' self , A > ListInsertion < A > for MutDListIterator < ' self , A > {
550+ impl < ' a , A > ListInsertion < A > for MutDListIterator < ' a , A > {
551551 #[ inline]
552552 fn insert_next ( & mut self , elt : A ) {
553553 self . insert_next_node ( ~Node :: new ( elt) )
0 commit comments