Skip to content

Commit

Permalink
Improve the document of excessive_for_each
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-Nak committed Feb 27, 2021
1 parent 19dd6d8 commit 3bdbe72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -930,8 +930,8 @@ declare_clippy_lint! {
}

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

0 comments on commit 3bdbe72

Please sign in to comment.