Skip to content

Commit d49501c

Browse files
authored
Use a better description of an internal function (#13721)
Found while reading code: the comment was incorrect as it stops counting as soon as two elements are different. changelog: none
2 parents 3d881e1 + 80df2c4 commit d49501c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_utils/src/hir_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ pub fn over<X>(left: &[X], right: &[X], mut eq_fn: impl FnMut(&X, &X) -> bool) -
733733
left.len() == right.len() && left.iter().zip(right).all(|(x, y)| eq_fn(x, y))
734734
}
735735

736-
/// Counts how many elements of the slices are equal as per `eq_fn`.
736+
/// Counts how many elements at the beginning of the slices are equal as per `eq_fn`.
737737
pub fn count_eq<X: Sized>(
738738
left: &mut dyn Iterator<Item = X>,
739739
right: &mut dyn Iterator<Item = X>,

0 commit comments

Comments
 (0)