Skip to content

Commit 38828bf

Browse files
authored
Fix typo in check_clousure function name (rust-lang#14025)
I noticed this because I failed to find this `check_closure` by grepping. changelog: none
2 parents 10045db + a487c60 commit 38828bf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clippy_lints/src/eta_reduction.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)