@@ -613,6 +613,9 @@ impl<T> [T] {
613
613
/// not divide the length of the slice, then the last chunk will
614
614
/// not have length `chunk_size`.
615
615
///
616
+ /// See [`exact_chunks`] for a variant of this iterator that returns chunks
617
+ /// of always exactly `chunk_size` elements.
618
+ ///
616
619
/// # Panics
617
620
///
618
621
/// Panics if `chunk_size` is 0.
@@ -638,6 +641,10 @@ impl<T> [T] {
638
641
/// not divide the length of the slice, then the last up to `chunk_size-1`
639
642
/// elements will be omitted.
640
643
///
644
+ /// Due to each chunk having exactly `chunk_size` elements, the compiler
645
+ /// can often optimize the resulting code better than in the case of
646
+ /// [`chunks`].
647
+ ///
641
648
/// # Panics
642
649
///
643
650
/// Panics if `chunk_size` is 0.
@@ -664,6 +671,9 @@ impl<T> [T] {
664
671
/// not divide the length of the slice, then the last chunk will not
665
672
/// have length `chunk_size`.
666
673
///
674
+ /// See [`exact_chunks_mut`] for a variant of this iterator that returns chunks
675
+ /// of always exactly `chunk_size` elements.
676
+ ///
667
677
/// # Panics
668
678
///
669
679
/// Panics if `chunk_size` is 0.
@@ -693,6 +703,11 @@ impl<T> [T] {
693
703
/// not divide the length of the slice, then the last up to `chunk_size-1`
694
704
/// elements will be omitted.
695
705
///
706
+ ///
707
+ /// Due to each chunk having exactly `chunk_size` elements, the compiler
708
+ /// can often optimize the resulting code better than in the case of
709
+ /// [`chunks_mut`].
710
+ ///
696
711
/// # Panics
697
712
///
698
713
/// Panics if `chunk_size` is 0.
0 commit comments