remove unnecessary to_string
and String::new
This commit is contained in:
parent
c570ab5a0b
commit
77d6176e69
88 changed files with 292 additions and 340 deletions
|
@ -443,7 +443,7 @@ impl<'s> LintLevelsBuilder<'s> {
|
|||
.span_suggestion(
|
||||
sp,
|
||||
"change it to",
|
||||
new_lint_name.to_string(),
|
||||
new_lint_name,
|
||||
Applicability::MachineApplicable,
|
||||
)
|
||||
.emit();
|
||||
|
@ -516,7 +516,7 @@ impl<'s> LintLevelsBuilder<'s> {
|
|||
err.span_suggestion(
|
||||
sp,
|
||||
"use the new name",
|
||||
new_name.to_string(),
|
||||
new_name,
|
||||
Applicability::MachineApplicable,
|
||||
);
|
||||
}
|
||||
|
@ -543,7 +543,7 @@ impl<'s> LintLevelsBuilder<'s> {
|
|||
db.span_suggestion(
|
||||
sp,
|
||||
"did you mean",
|
||||
suggestion.to_string(),
|
||||
suggestion,
|
||||
Applicability::MachineApplicable,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue