Skip to content

Commit c3a8237

Browse files
committed
Improve slice_group_by doc wording
1 parent ac39d3c commit c3a8237

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

library/core/src/slice/mod.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1737,9 +1737,9 @@ impl<T> [T] {
17371737
/// Returns an iterator over the slice producing non-overlapping runs
17381738
/// of elements using the predicate to separate them.
17391739
///
1740-
/// The predicate is called on two elements following themselves,
1741-
/// it means the predicate is called on `slice[0]` and `slice[1]`
1742-
/// then on `slice[1]` and `slice[2]` and so on.
1740+
/// The predicate is called for every pair of consecutive elements,
1741+
/// meaning that it is called on `slice[0]` and `slice[1]`,
1742+
/// followed by `slice[1]` and `slice[2]`, and so on.
17431743
///
17441744
/// # Examples
17451745
///
@@ -1778,9 +1778,9 @@ impl<T> [T] {
17781778
/// Returns an iterator over the slice producing non-overlapping mutable
17791779
/// runs of elements using the predicate to separate them.
17801780
///
1781-
/// The predicate is called on two elements following themselves,
1782-
/// it means the predicate is called on `slice[0]` and `slice[1]`
1783-
/// then on `slice[1]` and `slice[2]` and so on.
1781+
/// The predicate is called for every pair of consecutive elements,
1782+
/// meaning that it is called on `slice[0]` and `slice[1]`,
1783+
/// followed by `slice[1]` and `slice[2]`, and so on.
17841784
///
17851785
/// # Examples
17861786
///

0 commit comments

Comments
 (0)