@@ -385,12 +385,12 @@ pub fn once<T>(value: T) -> Once<T> {
385
385
///
386
386
/// [`once_with`]: fn.once_with.html
387
387
#[ derive( Copy , Clone , Debug ) ]
388
- #[ unstable( feature = "iter_once_with" , issue = "0 " ) ]
388
+ #[ unstable( feature = "iter_once_with" , issue = "57581 " ) ]
389
389
pub struct OnceWith < F > {
390
390
gen : Option < F > ,
391
391
}
392
392
393
- #[ unstable( feature = "iter_once_with" , issue = "0 " ) ]
393
+ #[ unstable( feature = "iter_once_with" , issue = "57581 " ) ]
394
394
impl < A , F : FnOnce ( ) -> A > Iterator for OnceWith < F > {
395
395
type Item = A ;
396
396
@@ -405,24 +405,24 @@ impl<A, F: FnOnce() -> A> Iterator for OnceWith<F> {
405
405
}
406
406
}
407
407
408
- #[ unstable( feature = "iter_once_with" , issue = "0 " ) ]
408
+ #[ unstable( feature = "iter_once_with" , issue = "57581 " ) ]
409
409
impl < A , F : FnOnce ( ) -> A > DoubleEndedIterator for OnceWith < F > {
410
410
fn next_back ( & mut self ) -> Option < A > {
411
411
self . next ( )
412
412
}
413
413
}
414
414
415
- #[ unstable( feature = "iter_once_with" , issue = "0 " ) ]
415
+ #[ unstable( feature = "iter_once_with" , issue = "57581 " ) ]
416
416
impl < A , F : FnOnce ( ) -> A > ExactSizeIterator for OnceWith < F > {
417
417
fn len ( & self ) -> usize {
418
418
self . gen . iter ( ) . len ( )
419
419
}
420
420
}
421
421
422
- #[ unstable( feature = "iter_once_with" , issue = "0 " ) ]
422
+ #[ unstable( feature = "iter_once_with" , issue = "57581 " ) ]
423
423
impl < A , F : FnOnce ( ) -> A > FusedIterator for OnceWith < F > { }
424
424
425
- #[ unstable( feature = "iter_once_with" , issue = "0 " ) ]
425
+ #[ unstable( feature = "iter_once_with" , issue = "57581 " ) ]
426
426
unsafe impl < A , F : FnOnce ( ) -> A > TrustedLen for OnceWith < F > { }
427
427
428
428
/// 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> {}
436
436
/// Unlike [`once`], this function will lazily generate the value on request.
437
437
///
438
438
/// [`once`]: fn.once.html
439
+ /// [`chain`]: trait.Iterator.html#method.chain
439
440
///
440
441
/// # Examples
441
442
///
@@ -480,7 +481,7 @@ unsafe impl<A, F: FnOnce() -> A> TrustedLen for OnceWith<F> {}
480
481
/// }
481
482
/// ```
482
483
#[ inline]
483
- #[ unstable( feature = "iter_once_with" , issue = "0 " ) ]
484
+ #[ unstable( feature = "iter_once_with" , issue = "57581 " ) ]
484
485
pub fn once_with < A , F : FnOnce ( ) -> A > ( gen : F ) -> OnceWith < F > {
485
486
OnceWith { gen : Some ( gen) }
486
487
}
0 commit comments