aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_ssr
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-26 17:59:06 +0000
committerGitHub <[email protected]>2021-03-26 17:59:06 +0000
commit77a447dcda82a9f0eb6e1f04bd4b1dd53a226c65 (patch)
treee691982730fe01802f874066927b2ebbe8badc75 /crates/ide_ssr
parent4ecaad98e074c42dbf637a11afcb630aafffd7b3 (diff)
parent5ff3299dd61ea5c5790c01819994c9d8fa6afc09 (diff)
Merge #8191
8191: syntax: return owned string instead of leaking string r=cynecx a=cynecx Quick hack? to alleviate https://github.com/rust-analyzer/rust-analyzer/issues/8181#issuecomment-806019126. I haven't run any tests but this should affect performance since we are deallocating more. r? @matklad Co-authored-by: cynecx <[email protected]>
Diffstat (limited to 'crates/ide_ssr')
-rw-r--r--crates/ide_ssr/src/resolving.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide_ssr/src/resolving.rs b/crates/ide_ssr/src/resolving.rs
index dc7835473..541da4122 100644
--- a/crates/ide_ssr/src/resolving.rs
+++ b/crates/ide_ssr/src/resolving.rs
@@ -150,7 +150,7 @@ impl Resolver<'_, '_> {
150 fn path_contains_placeholder(&self, path: &ast::Path) -> bool { 150 fn path_contains_placeholder(&self, path: &ast::Path) -> bool {
151 if let Some(segment) = path.segment() { 151 if let Some(segment) = path.segment() {
152 if let Some(name_ref) = segment.name_ref() { 152 if let Some(name_ref) = segment.name_ref() {
153 if self.placeholders_by_stand_in.contains_key(name_ref.text()) { 153 if self.placeholders_by_stand_in.contains_key(name_ref.text().as_str()) {
154 return true; 154 return true;
155 } 155 }
156 } 156 }