diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2025-01-18 15:44:05 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2025-01-18 16:08:42 +0100 |
| commit | a487c601a4433cd116a1def63eb8569089ebbf2a (patch) | |
| tree | 18e7a2c316342d61437b8cdf32694238bbb17955 | |
| parent | 10045db878644252c64175c326c4baf61a9202de (diff) | |
| download | rust-a487c601a4433cd116a1def63eb8569089ebbf2a.tar.gz rust-a487c601a4433cd116a1def63eb8569089ebbf2a.zip | |
Fix typo in `check_clousure` function name
| -rw-r--r-- | clippy_lints/src/eta_reduction.rs | 8 |
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(_)) |
