@@ -97,7 +97,7 @@ pub mod structs {
97
97
TakeWhileRef , TupleCombinations , Update , WhileSome ,
98
98
} ;
99
99
#[ cfg( feature = "use_alloc" ) ]
100
- pub use crate :: array_chunks :: ArrayChunks ;
100
+ pub use crate :: arrays :: Arrays ;
101
101
#[ cfg( feature = "use_alloc" ) ]
102
102
pub use crate :: combinations:: { ArrayCombinations , Combinations } ;
103
103
#[ cfg( feature = "use_alloc" ) ]
@@ -174,7 +174,7 @@ pub use crate::with_position::Position;
174
174
pub use crate :: ziptuple:: multizip;
175
175
mod adaptors;
176
176
#[ cfg( feature = "use_alloc" ) ]
177
- mod array_chunks ;
177
+ mod arrays ;
178
178
mod either_or_both;
179
179
pub use crate :: either_or_both:: EitherOrBoth ;
180
180
#[ doc( hidden) ]
@@ -757,41 +757,41 @@ pub trait Itertools: Iterator {
757
757
/// ```rust
758
758
/// use itertools::Itertools;
759
759
/// let mut v = Vec::new();
760
- /// for [a, b] in (1..5).array_chunks () {
760
+ /// for [a, b] in (1..5).arrays () {
761
761
/// v.push([a, b]);
762
762
/// }
763
763
/// assert_eq!(v, vec![[1, 2], [3, 4]]);
764
764
///
765
- /// let mut it = (1..9).array_chunks ();
765
+ /// let mut it = (1..9).arrays ();
766
766
/// assert_eq!(Some([1, 2, 3]), it.next());
767
767
/// assert_eq!(Some([4, 5, 6]), it.next());
768
768
/// assert_eq!(None, it.next());
769
769
/// itertools::assert_equal(it.remainder(), [7,8]);
770
770
///
771
771
/// // this requires a type hint
772
- /// let it = (1..7).array_chunks ::<3>();
772
+ /// let it = (1..7).arrays ::<3>();
773
773
/// itertools::assert_equal(it, vec![[1, 2, 3], [4, 5, 6]]);
774
774
///
775
775
/// // you can also specify the complete type
776
- /// use itertools::ArrayChunks ;
776
+ /// use itertools::Arrays ;
777
777
/// use std::ops::Range;
778
778
///
779
- /// let it: ArrayChunks <Range<u32>, 3> = (1..7).array_chunks ();
779
+ /// let it: Arrays <Range<u32>, 3> = (1..7).arrays ();
780
780
/// itertools::assert_equal(it, vec![[1, 2, 3], [4, 5, 6]]);
781
781
/// ```
782
782
///
783
783
/// ```compile_fail
784
784
/// use itertools::Itertools;
785
785
///
786
- /// let mut it = (1..5).array_chunks ::<0>();
786
+ /// let mut it = (1..5).arrays ::<0>();
787
787
/// assert_eq!(Some([]), it.next());
788
788
/// ```
789
789
#[ cfg( feature = "use_alloc" ) ]
790
- fn array_chunks < const N : usize > ( self ) -> ArrayChunks < Self , N >
790
+ fn arrays < const N : usize > ( self ) -> Arrays < Self , N >
791
791
where
792
792
Self : Sized ,
793
793
{
794
- ArrayChunks :: new ( self )
794
+ Arrays :: new ( self )
795
795
}
796
796
797
797
/// Return an iterator over all contiguous windows producing tuples of
0 commit comments