From 46b4f89c920c314caf1a8af2abdb09732d100d67 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 20 Jan 2021 01:56:11 +0300 Subject: . --- crates/hir_expand/src/name.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/hir_expand/src/name.rs') diff --git a/crates/hir_expand/src/name.rs b/crates/hir_expand/src/name.rs index 95d853b6d..d692cec14 100644 --- a/crates/hir_expand/src/name.rs +++ b/crates/hir_expand/src/name.rs @@ -38,7 +38,7 @@ impl Name { } pub fn new_lifetime(lt: &ast::Lifetime) -> Name { - Self::new_text(lt.text().clone()) + Self::new_text(lt.text().into()) } /// Shortcut to create inline plain text name @@ -47,12 +47,12 @@ impl Name { } /// Resolve a name from the text of token. - fn resolve(raw_text: &SmolStr) -> Name { + fn resolve(raw_text: &str) -> Name { let raw_start = "r#"; - if raw_text.as_str().starts_with(raw_start) { + if raw_text.starts_with(raw_start) { Name::new_text(SmolStr::new(&raw_text[raw_start.len()..])) } else { - Name::new_text(raw_text.clone()) + Name::new_text(raw_text.into()) } } -- cgit v1.2.3