@@ -76,20 +76,20 @@ impl<'tcx> LateLintPass<'tcx> for EtaReduction {
7676 fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &Expr<'tcx>) {
7777 if let ExprKind::MethodCall(_method, receiver, args, _) = expr.kind {
7878 for arg in args {
79- check_clousure (cx, Some(receiver), arg);
79+ check_closure (cx, Some(receiver), arg);
8080 }
8181 }
8282 if let ExprKind::Call(func, args) = expr.kind {
83- check_clousure (cx, None, func);
83+ check_closure (cx, None, func);
8484 for arg in args {
85- check_clousure (cx, None, arg);
85+ check_closure (cx, None, arg);
8686 }
8787 }
8888 }
8989}
9090
9191#[allow(clippy::too_many_lines)]
92- fn check_clousure <'tcx>(cx: &LateContext<'tcx>, outer_receiver: Option<&Expr<'tcx>>, expr: &Expr<'tcx>) {
92+ fn check_closure <'tcx>(cx: &LateContext<'tcx>, outer_receiver: Option<&Expr<'tcx>>, expr: &Expr<'tcx>) {
9393 let body = if let ExprKind::Closure(c) = expr.kind
9494 && c.fn_decl.inputs.iter().all(|ty| matches!(ty.kind, TyKind::Infer))
9595 && matches!(c.fn_decl.output, FnRetTy::DefaultReturn(_))
0 commit comments