@@ -1672,26 +1672,26 @@ for Inspect<'self, A, T> {
16721672}
16731673
16741674/// An iterator which just modifies the contained state throughout iteration.
1675- pub struct Unfoldr < ' self , A , St > {
1675+ pub struct Unfold < ' self , A , St > {
16761676 priv f: & ' self fn ( & mut St ) -> Option < A > ,
16771677 /// Internal state that will be yielded on the next iteration
16781678 state : St
16791679}
16801680
1681- impl < ' self , A , St > Unfoldr < ' self , A , St > {
1681+ impl < ' self , A , St > Unfold < ' self , A , St > {
16821682 /// Creates a new iterator with the specified closure as the "iterator
16831683 /// function" and an initial state to eventually pass to the iterator
16841684 #[ inline]
16851685 pub fn new < ' a > ( initial_state : St , f : & ' a fn ( & mut St ) -> Option < A > )
1686- -> Unfoldr < ' a , A , St > {
1687- Unfoldr {
1686+ -> Unfold < ' a , A , St > {
1687+ Unfold {
16881688 f : f,
16891689 state : initial_state
16901690 }
16911691 }
16921692}
16931693
1694- impl < ' self , A , St > Iterator < A > for Unfoldr < ' self , A , St > {
1694+ impl < ' self , A , St > Iterator < A > for Unfold < ' self , A , St > {
16951695 #[ inline]
16961696 fn next ( & mut self ) -> Option < A > {
16971697 ( self . f ) ( & mut self . state )
@@ -2213,7 +2213,7 @@ mod tests {
22132213 }
22142214 }
22152215
2216- let mut it = Unfoldr :: new ( 0 , count) ;
2216+ let mut it = Unfold :: new ( 0 , count) ;
22172217 let mut i = 0 ;
22182218 for counted in it {
22192219 assert_eq ! ( counted, i) ;
0 commit comments