summaryrefslogtreecommitdiff
path: root/src/syntax
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-08-16 18:52:26 +0200
committerLaurenz <laurmaedje@gmail.com>2021-08-16 19:15:03 +0200
commit9462fb17b390c57846b9215217ca7c32b649f0a5 (patch)
treebd6f96fea83c5e757c8f0eefefe5c0347784f00b /src/syntax
parentcb0aab3cfab2122a87d1d221290f7178b4291758 (diff)
Convert single-field structs to tuple structs
Diffstat (limited to 'src/syntax')
-rw-r--r--src/syntax/ident.rs12
1 files changed, 6 insertions, 6 deletions
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<str> 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<str> 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();