about summary refs log tree commit diff
diff options
context:
space:
mode:
authorKyle Huey <khuey@kylehuey.com>2023-01-04 14:58:07 -0800
committerKyle Huey <khuey@kylehuey.com>2023-01-04 14:58:07 -0800
commit755ae3fa29b0b2c6b11eaecf81b201b0a9a026bf (patch)
tree8d4a53c42c0087475ad1f600a9f3f4a1f43ff171
parentd0c1605d5151c86215ad609feadead811e5602c0 (diff)
downloadrust-755ae3fa29b0b2c6b11eaecf81b201b0a9a026bf.tar.gz
rust-755ae3fa29b0b2c6b11eaecf81b201b0a9a026bf.zip
Fix spelling while we're in the neighborhood.
-rw-r--r--clippy_lints/src/methods/iter_kv_map.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/methods/iter_kv_map.rs b/clippy_lints/src/methods/iter_kv_map.rs
index 1e5805c5347..c87f5daab6f 100644
--- a/clippy_lints/src/methods/iter_kv_map.rs
+++ b/clippy_lints/src/methods/iter_kv_map.rs
@@ -30,7 +30,7 @@ pub(super) fn check<'tcx>(
         if let Body {params: [p], value: body_expr, generator_kind: _ } = cx.tcx.hir().body(c.body);
         if let PatKind::Tuple([key_pat, val_pat], _) = p.pat.kind;
 
-        let (replacement_kind, annotation, binded_ident) = match (&key_pat.kind, &val_pat.kind) {
+        let (replacement_kind, annotation, bound_ident) = match (&key_pat.kind, &val_pat.kind) {
             (key, PatKind::Binding(ann, _, value, _)) if pat_is_wild(cx, key, m_arg) => ("value", ann, value),
             (PatKind::Binding(ann, _, key, _), value) if pat_is_wild(cx, value, m_arg) => ("key", ann, key),
             _ => return,
@@ -47,7 +47,7 @@ pub(super) fn check<'tcx>(
             if_chain! {
                 if let ExprKind::Path(rustc_hir::QPath::Resolved(_, path)) = body_expr.kind;
                 if let [local_ident] = path.segments;
-                if local_ident.ident.as_str() == binded_ident.as_str();
+                if local_ident.ident.as_str() == bound_ident.as_str();
 
                 then {
                     span_lint_and_sugg(
@@ -76,7 +76,7 @@ pub(super) fn check<'tcx>(
                         expr.span,
                         &format!("iterating on a map's {replacement_kind}s"),
                         "try",
-                        format!("{recv_snippet}.{into_prefix}{replacement_kind}s().map(|{ref_annotation}{mut_annotation}{binded_ident}| {})",
+                        format!("{recv_snippet}.{into_prefix}{replacement_kind}s().map(|{ref_annotation}{mut_annotation}{bound_ident}| {})",
                             snippet_with_applicability(cx, body_expr.span, "/* body */", &mut applicability)),
                         applicability,
                     );