Skip to content

Commit c5c2fb1

Browse files
committed
Improve slice_group_by doc wording
1 parent 0bccdb3 commit c5c2fb1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

library/core/src/slice/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,9 +1748,9 @@ impl<T> [T] {
17481748
/// Returns an iterator over the slice producing non-overlapping runs
17491749
/// of elements using the predicate to separate them.
17501750
///
1751-
/// The predicate is called on two elements following themselves,
1752-
/// it means the predicate is called on `slice[0]` and `slice[1]`
1753-
/// then on `slice[1]` and `slice[2]` and so on.
1751+
/// The predicate is called for every pair of consecutive elements,
1752+
/// meaning that it is called on `slice[0]` and `slice[1]`,
1753+
/// followed by `slice[1]` and `slice[2]`, and so on.
17541754
///
17551755
/// # Examples
17561756
///
@@ -1789,9 +1789,9 @@ impl<T> [T] {
17891789
/// Returns an iterator over the slice producing non-overlapping mutable
17901790
/// runs of elements using the predicate to separate them.
17911791
///
1792-
/// The predicate is called on two elements following themselves,
1793-
/// it means the predicate is called on `slice[0]` and `slice[1]`
1794-
/// then on `slice[1]` and `slice[2]` and so on.
1792+
/// The predicate is called for every pair of consecutive elements,
1793+
/// meaning that it is called on `slice[0]` and `slice[1]`,
1794+
/// followed by `slice[1]` and `slice[2]`, and so on.
17951795
///
17961796
/// # Examples
17971797
///

0 commit comments

Comments
 (0)