Fix deprecated type and string comparison

Type to string comparisons were already deprecated since 0.8 and are removed in 0.13.
This commit is contained in:
Philipp Niedermayer authored and GitHub committed 2025-02-13 19:03:40 +01:00
1 parent d90cdc1894
commit c179c25fe9
1 file changed
+2 -2
+2 -2
View File
@@ -39,7 +39,7 @@
if not "short" in entry { if not "short" in entry {
panic("Entry must contain a 'short' key") panic("Entry must contain a 'short' key")
} }
if type(entry.short) != "string" { if type(entry.short) != str {
panic("Entry 'short' must be a string") panic("Entry 'short' must be a string")
} }
if entry.short.trim() == "" { if entry.short.trim() == "" {
@@ -347,7 +347,7 @@
// Apply format-term() to get the term // Apply format-term() to get the term
let formatted-term = format-term(mode, short-form, long-form) let formatted-term = format-term(mode, short-form, long-form)
if type(formatted-term) != "string" { if type(formatted-term) != str {
// This is because we still need to capitalize the term, and we cannot do // This is because we still need to capitalize the term, and we cannot do
// that with content, thus requiring a string here. // that with content, thus requiring a string here.
// TODO: consider if we want to capitalize *before* this. First intuition is // TODO: consider if we want to capitalize *before* this. First intuition is