aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2020-12-31 09:13:14 +0000
committerLukas Wirth <[email protected]>2020-12-31 09:13:14 +0000
commit816190c6f6838f163acc4bbe6a06c302c99535b2 (patch)
tree6db96b8fceda3e68f63b4302f76b901786809704 /crates/hir_def
parenta9814fa9c037b0fafd30580a6e7682ed032d77e6 (diff)
Remove some unneeded string allocations
Diffstat (limited to 'crates/hir_def')
-rw-r--r--crates/hir_def/src/nameres.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_def/src/nameres.rs b/crates/hir_def/src/nameres.rs
index 9bf358775..5682e122d 100644
--- a/crates/hir_def/src/nameres.rs
+++ b/crates/hir_def/src/nameres.rs
@@ -454,7 +454,7 @@ mod diagnostics {
454 }); 454 });
455 for token in tokens { 455 for token in tokens {
456 if token.kind() == SyntaxKind::IDENT 456 if token.kind() == SyntaxKind::IDENT
457 && token.to_string() == *name 457 && token.text() == name.as_str()
458 { 458 {
459 precise_location = Some(token.text_range()); 459 precise_location = Some(token.text_range());
460 break 'outer; 460 break 'outer;