@@ -624,7 +624,7 @@ impl<T> [T] {
624
624
/// not divide the length of the slice, then the last chunk will
625
625
/// not have length `chunk_size`.
626
626
///
627
- /// See [`exact_chunks `] for a variant of this iterator that returns chunks
627
+ /// See [`chunks_exact `] for a variant of this iterator that returns chunks
628
628
/// of always exactly `chunk_size` elements.
629
629
///
630
630
/// # Panics
@@ -642,7 +642,7 @@ impl<T> [T] {
642
642
/// assert!(iter.next().is_none());
643
643
/// ```
644
644
///
645
- /// [`exact_chunks `]: #method.exact_chunks
645
+ /// [`chunks_exact `]: #method.chunks_exact
646
646
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
647
647
#[ inline]
648
648
pub fn chunks ( & self , chunk_size : usize ) -> Chunks < T > {
@@ -655,7 +655,7 @@ impl<T> [T] {
655
655
/// not divide the length of the slice, then the last chunk will not
656
656
/// have length `chunk_size`.
657
657
///
658
- /// See [`exact_chunks_mut `] for a variant of this iterator that returns chunks
658
+ /// See [`chunks_exact_mut `] for a variant of this iterator that returns chunks
659
659
/// of always exactly `chunk_size` elements.
660
660
///
661
661
/// # Panics
@@ -677,7 +677,7 @@ impl<T> [T] {
677
677
/// assert_eq!(v, &[1, 1, 2, 2, 3]);
678
678
/// ```
679
679
///
680
- /// [`exact_chunks_mut `]: #method.exact_chunks_mut
680
+ /// [`chunks_exact_mut `]: #method.chunks_exact_mut
681
681
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
682
682
#[ inline]
683
683
pub fn chunks_mut ( & mut self , chunk_size : usize ) -> ChunksMut < T > {
@@ -702,19 +702,19 @@ impl<T> [T] {
702
702
/// # Examples
703
703
///
704
704
/// ```
705
- /// #![feature(exact_chunks )]
705
+ /// #![feature(chunks_exact )]
706
706
///
707
707
/// let slice = ['l', 'o', 'r', 'e', 'm'];
708
- /// let mut iter = slice.exact_chunks (2);
708
+ /// let mut iter = slice.chunks_exact (2);
709
709
/// assert_eq!(iter.next().unwrap(), &['l', 'o']);
710
710
/// assert_eq!(iter.next().unwrap(), &['r', 'e']);
711
711
/// assert!(iter.next().is_none());
712
712
/// ```
713
713
///
714
714
/// [`chunks`]: #method.chunks
715
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
715
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
716
716
#[ inline]
717
- pub fn exact_chunks ( & self , chunk_size : usize ) -> ExactChunks < T > {
717
+ pub fn chunks_exact ( & self , chunk_size : usize ) -> ExactChunks < T > {
718
718
assert ! ( chunk_size != 0 ) ;
719
719
let rem = self . len ( ) % chunk_size;
720
720
let len = self . len ( ) - rem;
@@ -739,12 +739,12 @@ impl<T> [T] {
739
739
/// # Examples
740
740
///
741
741
/// ```
742
- /// #![feature(exact_chunks )]
742
+ /// #![feature(chunks_exact )]
743
743
///
744
744
/// let v = &mut [0, 0, 0, 0, 0];
745
745
/// let mut count = 1;
746
746
///
747
- /// for chunk in v.exact_chunks_mut (2) {
747
+ /// for chunk in v.chunks_exact_mut (2) {
748
748
/// for elem in chunk.iter_mut() {
749
749
/// *elem += count;
750
750
/// }
@@ -754,9 +754,9 @@ impl<T> [T] {
754
754
/// ```
755
755
///
756
756
/// [`chunks_mut`]: #method.chunks_mut
757
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
757
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
758
758
#[ inline]
759
- pub fn exact_chunks_mut ( & mut self , chunk_size : usize ) -> ExactChunksMut < T > {
759
+ pub fn chunks_exact_mut ( & mut self , chunk_size : usize ) -> ExactChunksMut < T > {
760
760
assert ! ( chunk_size != 0 ) ;
761
761
let rem = self . len ( ) % chunk_size;
762
762
let len = self . len ( ) - rem;
@@ -3657,20 +3657,20 @@ unsafe impl<'a, T> TrustedRandomAccess for ChunksMut<'a, T> {
3657
3657
/// up to `chunk_size-1` elements will be omitted but can be retrieved from
3658
3658
/// the [`remainder`] function from the iterator.
3659
3659
///
3660
- /// This struct is created by the [`exact_chunks `] method on [slices].
3660
+ /// This struct is created by the [`chunks_exact `] method on [slices].
3661
3661
///
3662
- /// [`exact_chunks `]: ../../std/primitive.slice.html#method.exact_chunks
3662
+ /// [`chunks_exact `]: ../../std/primitive.slice.html#method.chunks_exact
3663
3663
/// [`remainder`]: ../../std/slice/struct.ExactChunks.html#method.remainder
3664
3664
/// [slices]: ../../std/primitive.slice.html
3665
3665
#[ derive( Debug ) ]
3666
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
3666
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
3667
3667
pub struct ExactChunks < ' a , T : ' a > {
3668
3668
v : & ' a [ T ] ,
3669
3669
rem : & ' a [ T ] ,
3670
3670
chunk_size : usize
3671
3671
}
3672
3672
3673
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
3673
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
3674
3674
impl < ' a , T > ExactChunks < ' a , T > {
3675
3675
/// Return the remainder of the original slice that is not going to be
3676
3676
/// returned by the iterator. The returned slice has at most `chunk_size-1`
@@ -3681,7 +3681,7 @@ impl<'a, T> ExactChunks<'a, T> {
3681
3681
}
3682
3682
3683
3683
// FIXME(#26925) Remove in favor of `#[derive(Clone)]`
3684
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
3684
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
3685
3685
impl < ' a , T > Clone for ExactChunks < ' a , T > {
3686
3686
fn clone ( & self ) -> ExactChunks < ' a , T > {
3687
3687
ExactChunks {
@@ -3692,7 +3692,7 @@ impl<'a, T> Clone for ExactChunks<'a, T> {
3692
3692
}
3693
3693
}
3694
3694
3695
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
3695
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
3696
3696
impl < ' a , T > Iterator for ExactChunks < ' a , T > {
3697
3697
type Item = & ' a [ T ] ;
3698
3698
@@ -3737,7 +3737,7 @@ impl<'a, T> Iterator for ExactChunks<'a, T> {
3737
3737
}
3738
3738
}
3739
3739
3740
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
3740
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
3741
3741
impl < ' a , T > DoubleEndedIterator for ExactChunks < ' a , T > {
3742
3742
#[ inline]
3743
3743
fn next_back ( & mut self ) -> Option < & ' a [ T ] > {
@@ -3751,7 +3751,7 @@ impl<'a, T> DoubleEndedIterator for ExactChunks<'a, T> {
3751
3751
}
3752
3752
}
3753
3753
3754
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
3754
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
3755
3755
impl < ' a , T > ExactSizeIterator for ExactChunks < ' a , T > {
3756
3756
fn is_empty ( & self ) -> bool {
3757
3757
self . v . is_empty ( )
@@ -3761,7 +3761,7 @@ impl<'a, T> ExactSizeIterator for ExactChunks<'a, T> {
3761
3761
#[ unstable( feature = "trusted_len" , issue = "37572" ) ]
3762
3762
unsafe impl < ' a , T > TrustedLen for ExactChunks < ' a , T > { }
3763
3763
3764
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
3764
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
3765
3765
impl < ' a , T > FusedIterator for ExactChunks < ' a , T > { }
3766
3766
3767
3767
#[ doc( hidden) ]
@@ -3780,20 +3780,20 @@ unsafe impl<'a, T> TrustedRandomAccess for ExactChunks<'a, T> {
3780
3780
/// `chunk_size-1` elements will be omitted but can be retrieved from the
3781
3781
/// [`into_remainder`] function from the iterator.
3782
3782
///
3783
- /// This struct is created by the [`exact_chunks_mut `] method on [slices].
3783
+ /// This struct is created by the [`chunks_exact_mut `] method on [slices].
3784
3784
///
3785
- /// [`exact_chunks_mut `]: ../../std/primitive.slice.html#method.exact_chunks_mut
3785
+ /// [`chunks_exact_mut `]: ../../std/primitive.slice.html#method.chunks_exact_mut
3786
3786
/// [`into_remainder`]: ../../std/slice/struct.ExactChunksMut.html#method.into_remainder
3787
3787
/// [slices]: ../../std/primitive.slice.html
3788
3788
#[ derive( Debug ) ]
3789
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
3789
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
3790
3790
pub struct ExactChunksMut < ' a , T : ' a > {
3791
3791
v : & ' a mut [ T ] ,
3792
3792
rem : & ' a mut [ T ] ,
3793
3793
chunk_size : usize
3794
3794
}
3795
3795
3796
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
3796
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
3797
3797
impl < ' a , T > ExactChunksMut < ' a , T > {
3798
3798
/// Return the remainder of the original slice that is not going to be
3799
3799
/// returned by the iterator. The returned slice has at most `chunk_size-1`
@@ -3803,7 +3803,7 @@ impl<'a, T> ExactChunksMut<'a, T> {
3803
3803
}
3804
3804
}
3805
3805
3806
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
3806
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
3807
3807
impl < ' a , T > Iterator for ExactChunksMut < ' a , T > {
3808
3808
type Item = & ' a mut [ T ] ;
3809
3809
@@ -3850,7 +3850,7 @@ impl<'a, T> Iterator for ExactChunksMut<'a, T> {
3850
3850
}
3851
3851
}
3852
3852
3853
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
3853
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
3854
3854
impl < ' a , T > DoubleEndedIterator for ExactChunksMut < ' a , T > {
3855
3855
#[ inline]
3856
3856
fn next_back ( & mut self ) -> Option < & ' a mut [ T ] > {
@@ -3866,7 +3866,7 @@ impl<'a, T> DoubleEndedIterator for ExactChunksMut<'a, T> {
3866
3866
}
3867
3867
}
3868
3868
3869
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
3869
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
3870
3870
impl < ' a , T > ExactSizeIterator for ExactChunksMut < ' a , T > {
3871
3871
fn is_empty ( & self ) -> bool {
3872
3872
self . v . is_empty ( )
@@ -3876,7 +3876,7 @@ impl<'a, T> ExactSizeIterator for ExactChunksMut<'a, T> {
3876
3876
#[ unstable( feature = "trusted_len" , issue = "37572" ) ]
3877
3877
unsafe impl < ' a , T > TrustedLen for ExactChunksMut < ' a , T > { }
3878
3878
3879
- #[ unstable( feature = "exact_chunks " , issue = "47115" ) ]
3879
+ #[ unstable( feature = "chunks_exact " , issue = "47115" ) ]
3880
3880
impl < ' a , T > FusedIterator for ExactChunksMut < ' a , T > { }
3881
3881
3882
3882
#[ doc( hidden) ]
0 commit comments