@@ -395,6 +395,7 @@ macro_rules! spec_int_ranges {
395
395
}
396
396
}
397
397
398
+ #[ inline]
398
399
fn spec_size_hint( & self ) -> ( usize , Option <usize >) {
399
400
let remaining = self . iter. end as usize ;
400
401
( remaining, Some ( remaining) )
@@ -403,11 +404,13 @@ macro_rules! spec_int_ranges {
403
404
// The methods below are all copied from the Iterator trait default impls.
404
405
// We have to repeat them here so that the specialization overrides the StepByImpl defaults
405
406
407
+ #[ inline]
406
408
fn spec_nth( & mut self , n: usize ) -> Option <Self :: Item > {
407
409
self . advance_by( n) . ok( ) ?;
408
410
self . next( )
409
411
}
410
412
413
+ #[ inline]
411
414
fn spec_try_fold<Acc , F , R >( & mut self , init: Acc , mut f: F ) -> R
412
415
where
413
416
F : FnMut ( Acc , Self :: Item ) -> R ,
@@ -449,6 +452,7 @@ macro_rules! spec_int_ranges_r {
449
452
450
453
impl StepByBackImpl <Range <$t>> for StepBy <Range <$t>> {
451
454
455
+ #[ inline]
452
456
fn spec_next_back( & mut self ) -> Option <Self :: Item >
453
457
where Range <$t>: DoubleEndedIterator + ExactSizeIterator ,
454
458
{
@@ -466,6 +470,7 @@ macro_rules! spec_int_ranges_r {
466
470
// The methods below are all copied from the Iterator trait default impls.
467
471
// We have to repeat them here so that the specialization overrides the StepByImplBack defaults
468
472
473
+ #[ inline]
469
474
fn spec_nth_back( & mut self , n: usize ) -> Option <Self :: Item >
470
475
where Self : DoubleEndedIterator ,
471
476
{
@@ -475,6 +480,7 @@ macro_rules! spec_int_ranges_r {
475
480
self . next_back( )
476
481
}
477
482
483
+ #[ inline]
478
484
fn spec_try_rfold<Acc , F , R >( & mut self , init: Acc , mut f: F ) -> R
479
485
where
480
486
Self : DoubleEndedIterator ,
@@ -488,6 +494,7 @@ macro_rules! spec_int_ranges_r {
488
494
try { accum }
489
495
}
490
496
497
+ #[ inline]
491
498
fn spec_rfold<Acc , F >( mut self , init: Acc , mut f: F ) -> Acc
492
499
where
493
500
Self : DoubleEndedIterator ,
0 commit comments