From 9462fb17b390c57846b9215217ca7c32b649f0a5 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Mon, 16 Aug 2021 18:52:26 +0200 Subject: Convert single-field structs to tuple structs --- src/syntax/ident.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/syntax') diff --git a/src/syntax/ident.rs b/src/syntax/ident.rs index 2a7df8e1..66ffb46d 100644 --- a/src/syntax/ident.rs +++ b/src/syntax/ident.rs @@ -39,12 +39,6 @@ impl Ident { } } -impl AsRef for Ident { - fn as_ref(&self) -> &str { - self - } -} - impl Deref for Ident { type Target = str; @@ -53,6 +47,12 @@ impl Deref for Ident { } } +impl AsRef for Ident { + fn as_ref(&self) -> &str { + self + } +} + /// Whether a string is a valid identifier. pub fn is_ident(string: &str) -> bool { let mut chars = string.chars(); -- cgit v1.2.3