From 67f0ba4af8be42d361adc8d047121fe6c820c0d4 Mon Sep 17 00:00:00 2001 From: Chen Chen <0109chenchen@gmail.com> Date: Sat, 16 Sep 2023 22:12:40 +0800 Subject: [PATCH] Update clippy_lints/src/matches/redundant_guards.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix typo Co-authored-by: Alejandra González --- clippy_lints/src/matches/redundant_guards.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/matches/redundant_guards.rs b/clippy_lints/src/matches/redundant_guards.rs index d51d7edc8e35..d470c05f3511 100644 --- a/clippy_lints/src/matches/redundant_guards.rs +++ b/clippy_lints/src/matches/redundant_guards.rs @@ -123,7 +123,7 @@ fn get_pat_binding<'tcx>( if matches!(bind_annot.0, rustc_ast::ByRef::Yes) { let _ = byref_ident.insert(ident); } - // the second call of `replce()` returns a `Some(span)`, meaning a multi-binding pattern + // the second call of `replace()` returns a `Some(span)`, meaning a multi-binding pattern if span.replace(pat.span).is_some() { multiple_bindings = true; return false;