implicit-saturating-sub: make lint adhere to lint message convention
This commit is contained in:
parent
f171f89aed
commit
bdf4dc3abd
2 changed files with 25 additions and 25 deletions
|
|
@ -158,9 +158,9 @@ fn print_lint_and_sugg(cx: &LateContext<'_>, var_name: &str, expr: &Expr<'_>) {
|
|||
cx,
|
||||
IMPLICIT_SATURATING_SUB,
|
||||
expr.span,
|
||||
"Implicitly performing saturating subtraction",
|
||||
"implicitly performing saturating subtraction",
|
||||
"try",
|
||||
format!("{} = {}.saturating_sub({});", var_name, var_name, 1.to_string()),
|
||||
format!("{} = {}.saturating_sub({});", var_name, var_name, '1'),
|
||||
Applicability::MachineApplicable,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue