@@ -385,12 +385,12 @@ pub fn once<T>(value: T) -> Once<T> {
385385///
386386/// [`once_with`]: fn.once_with.html
387387#[ derive( Copy , Clone , Debug ) ]
388- #[ unstable( feature = "iter_once_with" , issue = "0 " ) ]
388+ #[ unstable( feature = "iter_once_with" , issue = "57581 " ) ]
389389pub struct OnceWith < F > {
390390 gen : Option < F > ,
391391}
392392
393- #[ unstable( feature = "iter_once_with" , issue = "0 " ) ]
393+ #[ unstable( feature = "iter_once_with" , issue = "57581 " ) ]
394394impl < A , F : FnOnce ( ) -> A > Iterator for OnceWith < F > {
395395 type Item = A ;
396396
@@ -405,24 +405,24 @@ impl<A, F: FnOnce() -> A> Iterator for OnceWith<F> {
405405 }
406406}
407407
408- #[ unstable( feature = "iter_once_with" , issue = "0 " ) ]
408+ #[ unstable( feature = "iter_once_with" , issue = "57581 " ) ]
409409impl < A , F : FnOnce ( ) -> A > DoubleEndedIterator for OnceWith < F > {
410410 fn next_back ( & mut self ) -> Option < A > {
411411 self . next ( )
412412 }
413413}
414414
415- #[ unstable( feature = "iter_once_with" , issue = "0 " ) ]
415+ #[ unstable( feature = "iter_once_with" , issue = "57581 " ) ]
416416impl < A , F : FnOnce ( ) -> A > ExactSizeIterator for OnceWith < F > {
417417 fn len ( & self ) -> usize {
418418 self . gen . iter ( ) . len ( )
419419 }
420420}
421421
422- #[ unstable( feature = "iter_once_with" , issue = "0 " ) ]
422+ #[ unstable( feature = "iter_once_with" , issue = "57581 " ) ]
423423impl < A , F : FnOnce ( ) -> A > FusedIterator for OnceWith < F > { }
424424
425- #[ unstable( feature = "iter_once_with" , issue = "0 " ) ]
425+ #[ unstable( feature = "iter_once_with" , issue = "57581 " ) ]
426426unsafe impl < A , F : FnOnce ( ) -> A > TrustedLen for OnceWith < F > { }
427427
428428/// Creates an iterator that lazily generates a value exactly once by invoking
@@ -436,6 +436,7 @@ unsafe impl<A, F: FnOnce() -> A> TrustedLen for OnceWith<F> {}
436436/// Unlike [`once`], this function will lazily generate the value on request.
437437///
438438/// [`once`]: fn.once.html
439+ /// [`chain`]: trait.Iterator.html#method.chain
439440///
440441/// # Examples
441442///
@@ -480,7 +481,7 @@ unsafe impl<A, F: FnOnce() -> A> TrustedLen for OnceWith<F> {}
480481/// }
481482/// ```
482483#[ inline]
483- #[ unstable( feature = "iter_once_with" , issue = "0 " ) ]
484+ #[ unstable( feature = "iter_once_with" , issue = "57581 " ) ]
484485pub fn once_with < A , F : FnOnce ( ) -> A > ( gen : F ) -> OnceWith < F > {
485486 OnceWith { gen : Some ( gen) }
486487}
0 commit comments