From 3e13e24ed55571f19173a1270ccebdc517742282 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Sat, 16 Jul 2016 18:25:00 +0530 Subject: [PATCH] redundant closures don't allocate --- clippy_lints/src/eta_reduction.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/eta_reduction.rs b/clippy_lints/src/eta_reduction.rs index 4cd9bc8cba6..30c8e2645ae 100644 --- a/clippy_lints/src/eta_reduction.rs +++ b/clippy_lints/src/eta_reduction.rs @@ -11,8 +11,8 @@ pub struct EtaPass; /// function can be called directly. `unsafe` functions or calls where types get adjusted are /// ignored. /// -/// **Why is this bad?** Needlessly creating a closure just costs heap space and adds code for no -/// benefit. +/// **Why is this bad?** Needlessly creating a closure adds code for no +/// benefit and gives the optimizer more work. /// /// **Known problems:** None ///