perf: Use specialized `ToString`

Ref: https://rust-lang.github.io/rust-clippy/master/index.html#inefficient_to_string
This commit is contained in:
Dmitry Dygalo 2022-09-13 11:32:36 +02:00
parent f8af40173a
commit 668e41f0f6
No known key found for this signature in database
GPG Key ID: 0D78E60518FE18BB
2 changed files with 3 additions and 3 deletions

View File

@ -311,7 +311,7 @@ pub fn check_repeated_keys(
(Some(DictionaryKey::Variable(v1)), Some(DictionaryKey::Variable(v2))) => {
if check_repeated_variables && v1 == v2 {
checks.push(Check::new(
CheckKind::MultiValueRepeatedKeyVariable(v2.to_string()),
CheckKind::MultiValueRepeatedKeyVariable((*v2).to_string()),
k2.location,
))
}

View File

@ -997,7 +997,7 @@ impl<'a> Checker<'a> {
for builtin in BUILTINS {
scope.values.insert(
builtin.to_string(),
(*builtin).to_string(),
Binding {
kind: BindingKind::Builtin,
location: Default::default(),
@ -1007,7 +1007,7 @@ impl<'a> Checker<'a> {
}
for builtin in MAGIC_GLOBALS {
scope.values.insert(
builtin.to_string(),
(*builtin).to_string(),
Binding {
kind: BindingKind::Builtin,
location: Default::default(),