aboutsummaryrefslogtreecommitdiff
path: root/azalea-brigadier/src/string_reader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-brigadier/src/string_reader.rs')
-rwxr-xr-xazalea-brigadier/src/string_reader.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/azalea-brigadier/src/string_reader.rs b/azalea-brigadier/src/string_reader.rs
index 9eb09b57..03e105dd 100755
--- a/azalea-brigadier/src/string_reader.rs
+++ b/azalea-brigadier/src/string_reader.rs
@@ -77,7 +77,7 @@ impl StringReader {
}
pub fn is_allowed_number(c: char) -> bool {
- ('0'..='9').contains(&c) || c == '.' || c == '-'
+ c.is_ascii_digit() || c == '.' || c == '-'
}
pub fn is_quoted_string_start(c: char) -> bool {
@@ -175,9 +175,9 @@ impl StringReader {
}
pub fn is_allowed_in_unquoted_string(c: char) -> bool {
- ('0'..='9').contains(&c)
- || ('A'..='Z').contains(&c)
- || ('a'..='z').contains(&c)
+ c.is_ascii_digit()
+ || c.is_ascii_uppercase()
+ || c.is_ascii_lowercase()
|| c == '_'
|| c == '-'
|| c == '.'