diff --git a/crates/gpui/src/text_system/font_features.rs b/crates/gpui/src/text_system/font_features.rs index db48db62ef..d9da15686c 100644 --- a/crates/gpui/src/text_system/font_features.rs +++ b/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()) }