about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYoshitomo Nakanishi <yurayura.rounin.3@gmail.com>2021-02-27 13:50:22 +0900
committerYoshitomo Nakanishi <yurayura.rounin.3@gmail.com>2021-04-01 00:05:42 +0900
commit38431712998affe21621174faa2e490525d6b221 (patch)
tree808bdede5533cdd63db183a6bbde43ef7b2711be
parent25d8b94cecf5f7d17fc1d3d6140b62ae2f910b56 (diff)
downloadrust-38431712998affe21621174faa2e490525d6b221.tar.gz
rust-38431712998affe21621174faa2e490525d6b221.zip
Improve the document of excessive_for_each
-rw-r--r--clippy_lints/src/methods/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs
index 344c7f1bd9a..f0c99528fe1 100644
--- a/clippy_lints/src/methods/mod.rs
+++ b/clippy_lints/src/methods/mod.rs
@@ -975,8 +975,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.