Skip to content

Commit 3bdbe72

Browse files
committed
Improve the document of excessive_for_each
1 parent 19dd6d8 commit 3bdbe72

File tree

1 file changed

+2
-2
lines changed
  • clippy_lints/src/methods

1 file changed

+2
-2
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,8 +930,8 @@ declare_clippy_lint! {
930930
}
931931

932932
declare_clippy_lint! {
933-
/// **What it does:** Checks for use of `obj.method().for_each(closure)` if obj doesn't
934-
/// implelement `Iterator` and `method()` returns `Impl Iterator` type.
933+
/// **What it does:** Checks for use of `.method(..).for_each(closure)` if the reciever of `.method(..)` doesn't
934+
/// implement `Iterator` and the return type of `.method(..)` implements `Iterator`.
935935
///
936936
/// **Why is this bad?** Excessive use of `for_each` reduces redability, using `for` loop is
937937
/// clearer and more concise.

0 commit comments

Comments
 (0)