Skip to content

Commit 3072cd1

Browse files
committed
Remove binding to variable
1 parent 3402cc6 commit 3072cd1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clippy_lints/src/implicit_saturating_sub.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,13 @@ fn subtracts_one(expr: &Expr<'_>) -> bool {
151151
}
152152

153153
fn print_lint_and_sugg(cx: &LateContext<'_, '_>, var_name: &str, expr: &Expr<'_>) {
154-
let applicability = Applicability::MachineApplicable;
155154
span_lint_and_sugg(
156155
cx,
157156
IMPLICIT_SATURATING_SUB,
158157
expr.span,
159158
"Implicitly performing saturating subtraction",
160159
"try",
161160
format!("{} = {}.saturating_sub({});", var_name, var_name, 1.to_string()),
162-
applicability,
161+
Applicability::MachineApplicable,
163162
);
164163
}

0 commit comments

Comments
 (0)