Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-expand/src/name.rs')
| -rw-r--r-- | crates/hir-expand/src/name.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/hir-expand/src/name.rs b/crates/hir-expand/src/name.rs index 23ca77f5a0..482c3116c4 100644 --- a/crates/hir-expand/src/name.rs +++ b/crates/hir-expand/src/name.rs @@ -114,11 +114,10 @@ impl Name { Name { symbol, ctx: () } } - pub fn new_lifetime(lt: &ast::Lifetime) -> Name { - let text = lt.text(); - match text.strip_prefix("'r#") { - Some(text) => Self::new_text(&format_smolstr!("'{text}")), - None => Self::new_text(text.as_str()), + pub fn new_lifetime(lt: &str) -> Name { + match lt.strip_prefix("'r#") { + Some(lt) => Self::new_text(&format_smolstr!("'{lt}")), + None => Self::new_text(lt), } } |