1
Fork 0

remove unnecessary to_string and String::new

This commit is contained in:
Takayuki Maeda 2022-06-13 15:48:40 +09:00
parent c570ab5a0b
commit 77d6176e69
88 changed files with 292 additions and 340 deletions

View file

@ -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,
);
}