diff options
author | cynecx <[email protected]> | 2021-03-26 17:30:59 +0000 |
---|---|---|
committer | cynecx <[email protected]> | 2021-03-26 17:30:59 +0000 |
commit | 5ff3299dd61ea5c5790c01819994c9d8fa6afc09 (patch) | |
tree | e691982730fe01802f874066927b2ebbe8badc75 /crates/hir | |
parent | 4ecaad98e074c42dbf637a11afcb630aafffd7b3 (diff) |
syntax: return owned string instead of leaking string
Diffstat (limited to 'crates/hir')
-rw-r--r-- | crates/hir/src/semantics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir/src/semantics.rs b/crates/hir/src/semantics.rs index 1198e3f0b..3ff135f41 100644 --- a/crates/hir/src/semantics.rs +++ b/crates/hir/src/semantics.rs | |||
@@ -445,7 +445,7 @@ impl<'db> SemanticsImpl<'db> { | |||
445 | } | 445 | } |
446 | }; | 446 | }; |
447 | gpl.lifetime_params() | 447 | gpl.lifetime_params() |
448 | .find(|tp| tp.lifetime().as_ref().map(|lt| lt.text()) == Some(text)) | 448 | .find(|tp| tp.lifetime().as_ref().map(|lt| lt.text()).as_ref() == Some(&text)) |
449 | })?; | 449 | })?; |
450 | let src = self.find_file(lifetime_param.syntax().clone()).with_value(lifetime_param); | 450 | let src = self.find_file(lifetime_param.syntax().clone()).with_value(lifetime_param); |
451 | ToDef::to_def(self, src) | 451 | ToDef::to_def(self, src) |