Skip to content

Commit 755ae3f

Browse files
committed
Fix spelling while we're in the neighborhood.
1 parent d0c1605 commit 755ae3f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

clippy_lints/src/methods/iter_kv_map.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub(super) fn check<'tcx>(
3030
if let Body {params: [p], value: body_expr, generator_kind: _ } = cx.tcx.hir().body(c.body);
3131
if let PatKind::Tuple([key_pat, val_pat], _) = p.pat.kind;
3232

33-
let (replacement_kind, annotation, binded_ident) = match (&key_pat.kind, &val_pat.kind) {
33+
let (replacement_kind, annotation, bound_ident) = match (&key_pat.kind, &val_pat.kind) {
3434
(key, PatKind::Binding(ann, _, value, _)) if pat_is_wild(cx, key, m_arg) => ("value", ann, value),
3535
(PatKind::Binding(ann, _, key, _), value) if pat_is_wild(cx, value, m_arg) => ("key", ann, key),
3636
_ => return,
@@ -47,7 +47,7 @@ pub(super) fn check<'tcx>(
4747
if_chain! {
4848
if let ExprKind::Path(rustc_hir::QPath::Resolved(_, path)) = body_expr.kind;
4949
if let [local_ident] = path.segments;
50-
if local_ident.ident.as_str() == binded_ident.as_str();
50+
if local_ident.ident.as_str() == bound_ident.as_str();
5151

5252
then {
5353
span_lint_and_sugg(
@@ -76,7 +76,7 @@ pub(super) fn check<'tcx>(
7676
expr.span,
7777
&format!("iterating on a map's {replacement_kind}s"),
7878
"try",
79-
format!("{recv_snippet}.{into_prefix}{replacement_kind}s().map(|{ref_annotation}{mut_annotation}{binded_ident}| {})",
79+
format!("{recv_snippet}.{into_prefix}{replacement_kind}s().map(|{ref_annotation}{mut_annotation}{bound_ident}| {})",
8080
snippet_with_applicability(cx, body_expr.span, "/* body */", &mut applicability)),
8181
applicability,
8282
);

0 commit comments

Comments
 (0)