Improve slice_group_by doc wording

This commit is contained in:
Niklas Fiekas 2023-11-17 12:35:46 +01:00
parent 0bccdb34a2
commit c5c2fb1761
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -1748,9 +1748,9 @@ impl<T> [T] {
/// Returns an iterator over the slice producing non-overlapping runs /// Returns an iterator over the slice producing non-overlapping runs
/// of elements using the predicate to separate them. /// of elements using the predicate to separate them.
/// ///
/// The predicate is called on two elements following themselves, /// The predicate is called for every pair of consecutive elements,
/// it means the predicate is called on `slice[0]` and `slice[1]` /// meaning that it is called on `slice[0]` and `slice[1]`,
/// then on `slice[1]` and `slice[2]` and so on. /// followed by `slice[1]` and `slice[2]`, and so on.
/// ///
/// # Examples /// # Examples
/// ///
@ -1789,9 +1789,9 @@ impl<T> [T] {
/// Returns an iterator over the slice producing non-overlapping mutable /// Returns an iterator over the slice producing non-overlapping mutable
/// runs of elements using the predicate to separate them. /// runs of elements using the predicate to separate them.
/// ///
/// The predicate is called on two elements following themselves, /// The predicate is called for every pair of consecutive elements,
/// it means the predicate is called on `slice[0]` and `slice[1]` /// meaning that it is called on `slice[0]` and `slice[1]`,
/// then on `slice[1]` and `slice[2]` and so on. /// followed by `slice[1]` and `slice[2]`, and so on.
/// ///
/// # Examples /// # Examples
/// ///