mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-28 09:54:33 +00:00
Simplify font feature tag validation (#13548)
Simplifies the logic for the changes of #13542. Release Notes: - N/A
This commit is contained in:
parent
89951f7e66
commit
1260c616ba
1 changed files with 1 additions and 9 deletions
|
@ -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())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue