Refactor.

This commit is contained in:
Stephen Chung
2022-09-25 12:24:03 +08:00
parent def1a683ef
commit b56a9c22f3
20 changed files with 55 additions and 16 deletions

View File

@@ -28,6 +28,7 @@ impl fmt::Debug for Ident {
impl AsRef<str> for Ident {
#[inline(always)]
#[must_use]
fn as_ref(&self) -> &str {
self.name.as_ref()
}
@@ -37,6 +38,7 @@ impl Deref for Ident {
type Target = ImmutableString;
#[inline(always)]
#[must_use]
fn deref(&self) -> &Self::Target {
&self.name
}
@@ -44,6 +46,7 @@ impl Deref for Ident {
impl DerefMut for Ident {
#[inline(always)]
#[must_use]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.name
}