diff options
| author | kcz <kcz@kcz.sh> | 2024-03-08 22:54:06 -0500 |
|---|---|---|
| committer | kcz <kcz@kcz.sh> | 2024-03-08 23:05:16 -0500 |
| commit | 7473f0522cd59259c1f2d3d25ff2d3351700fe22 (patch) | |
| tree | cce98d70f0dc6b61dcb4d6b0edb6e6ca666854b7 /clippy_lints/src/methods/no_effect_replace.rs | |
| parent | 0b4b684b46b5b962eca2d275ad609b7ade946505 (diff) | |
[`no_effect_replace`]: Fix duplicate diagnostics
Diffstat (limited to 'clippy_lints/src/methods/no_effect_replace.rs')
| -rw-r--r-- | clippy_lints/src/methods/no_effect_replace.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clippy_lints/src/methods/no_effect_replace.rs b/clippy_lints/src/methods/no_effect_replace.rs index 81df32bdee2..a301a5f7d65 100644 --- a/clippy_lints/src/methods/no_effect_replace.rs +++ b/clippy_lints/src/methods/no_effect_replace.rs @@ -25,6 +25,7 @@ pub(super) fn check<'tcx>( && param1 == param2.as_str() { span_lint(cx, NO_EFFECT_REPLACE, expr.span, "replacing text with itself"); + return; } if SpanlessEq::new(cx).eq_expr(arg1, arg2) { |
