Skip to content

Commit

Permalink
Simplify font feature tag validation (zed-industries#13548)
Browse files Browse the repository at this point in the history
Simplifies the logic for the changes of zed-industries#13542.

Release Notes:

- N/A
  • Loading branch information
Peiffap authored Jun 26, 2024
1 parent 89951f7 commit 1260c61
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions crates/gpui/src/text_system/font_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

0 comments on commit 1260c61

Please sign in to comment.