]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/eta_reduction.rs
Merge commit 'd7b5cbf065b88830ca519adcb73fad4c0d24b1c7' into clippyup
[rust.git] / src / tools / clippy / clippy_lints / src / eta_reduction.rs
index 197cac86a57d6d1772c2f44ef50d4cc4dcc2924a..a5a763c37d1bec0f8d3854ef1bf14ac8ad287a44 100644 (file)
     ///
     /// ### Example
     /// ```rust,ignore
-    /// // Bad
     /// xs.map(|x| foo(x))
+    /// ```
     ///
-    /// // Good
+    /// Use instead:
+    /// ```rust,ignore
+    /// // where `foo(_)` is a plain function that takes the exact argument type of `x`.
     /// xs.map(foo)
     /// ```
-    /// where `foo(_)` is a plain function that takes the exact argument type of
-    /// `x`.
     #[clippy::version = "pre 1.29.0"]
     pub REDUNDANT_CLOSURE,
     style,