Simplify font feature tag validation (#13548)

Gilles Peiffer created

Simplifies the logic for the changes of #13542.

Release Notes:

- N/A

Change summary

crates/gpui/src/text_system/font_features.rs | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)

Detailed changes

crates/gpui/src/text_system/font_features.rs 🔗

@@ -144,13 +144,5 @@ impl schemars::JsonSchema for FontFeatures {
 }
 
 fn is_valid_feature_tag(tag: &str) -> bool {
-    if tag.len() != 4 {
-        return false;
-    }
-    for ch in tag.chars() {
-        if !ch.is_ascii_alphanumeric() {
-            return false;
-        }
-    }
-    true
+    tag.len() == 4 && tag.chars().all(|c| c.is_ascii_alphanumeric())
 }