From 875ad9b5c410200f5072515ae91b4ff51cff0448 Mon Sep 17 00:00:00 2001 From: Jean SIMARD Date: Wed, 23 Sep 2020 08:45:35 +0200 Subject: Bump smol_str from 0.1.16 to 0.1.17 --- crates/hir_expand/src/name.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/hir_expand') diff --git a/crates/hir_expand/src/name.rs b/crates/hir_expand/src/name.rs index 49841c7a1..a5750d829 100644 --- a/crates/hir_expand/src/name.rs +++ b/crates/hir_expand/src/name.rs @@ -43,8 +43,8 @@ impl Name { } /// Shortcut to create inline plain text name - const fn new_inline_ascii(text: &[u8]) -> Name { - Name::new_text(SmolStr::new_inline_from_ascii(text.len(), text)) + const fn new_inline(text: &str) -> Name { + Name::new_text(SmolStr::new_inline(text)) } /// Resolve a name from the text of token. @@ -127,7 +127,7 @@ pub mod known { $( #[allow(bad_style)] pub const $ident: super::Name = - super::Name::new_inline_ascii(stringify!($ident).as_bytes()); + super::Name::new_inline(stringify!($ident)); )* }; } @@ -210,8 +210,8 @@ pub mod known { ); // self/Self cannot be used as an identifier - pub const SELF_PARAM: super::Name = super::Name::new_inline_ascii(b"self"); - pub const SELF_TYPE: super::Name = super::Name::new_inline_ascii(b"Self"); + pub const SELF_PARAM: super::Name = super::Name::new_inline("self"); + pub const SELF_TYPE: super::Name = super::Name::new_inline("Self"); #[macro_export] macro_rules! name { -- cgit v1.2.3