about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTimo <30553356+y21@users.noreply.github.com>2025-01-18 17:32:30 +0000
committerGitHub <noreply@github.com>2025-01-18 17:32:30 +0000
commit38828bf89a2be5e1ad0faa570a826ac1119c0868 (patch)
tree18e7a2c316342d61437b8cdf32694238bbb17955
parent10045db878644252c64175c326c4baf61a9202de (diff)
parenta487c601a4433cd116a1def63eb8569089ebbf2a (diff)
downloadrust-38828bf89a2be5e1ad0faa570a826ac1119c0868.tar.gz
rust-38828bf89a2be5e1ad0faa570a826ac1119c0868.zip
Fix typo in `check_clousure` function name (#14025)
I noticed this because I failed to find this `check_closure` by
grepping.

changelog: none
-rw-r--r--clippy_lints/src/eta_reduction.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/clippy_lints/src/eta_reduction.rs b/clippy_lints/src/eta_reduction.rs
index c0b4743fd71..6cba6e2e9c7 100644
--- a/clippy_lints/src/eta_reduction.rs
+++ b/clippy_lints/src/eta_reduction.rs
@@ -76,20 +76,20 @@ impl<'tcx> LateLintPass<'tcx> for EtaReduction {
     fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) {
         if let ExprKind::MethodCall(_method, receiver, args, _) = expr.kind {
             for arg in args {
-                check_clousure(cx, Some(receiver), arg);
+                check_closure(cx, Some(receiver), arg);
             }
         }
         if let ExprKind::Call(func, args) = expr.kind {
-            check_clousure(cx, None, func);
+            check_closure(cx, None, func);
             for arg in args {
-                check_clousure(cx, None, arg);
+                check_closure(cx, None, arg);
             }
         }
     }
 }
 
 #[allow(clippy::too_many_lines)]
-fn check_clousure<'tcx>(cx: &LateContext<'tcx>, outer_receiver: Option<&Expr<'tcx>>, expr: &Expr<'tcx>) {
+fn check_closure<'tcx>(cx: &LateContext<'tcx>, outer_receiver: Option<&Expr<'tcx>>, expr: &Expr<'tcx>) {
     let body = if let ExprKind::Closure(c) = expr.kind
         && c.fn_decl.inputs.iter().all(|ty| matches!(ty.kind, TyKind::Infer))
         && matches!(c.fn_decl.output, FnRetTy::DefaultReturn(_))