v: vet for empty string conditions (#21529)

This commit is contained in:
Turiiya 2024-05-19 16:57:52 +02:00 committed by GitHub
parent 6752ce8914
commit f7e820cdeb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 45 additions and 48 deletions

View file

@ -25,7 +25,7 @@ pub enum ValueKind {
// check_json
fn check_json(val string) ! {
if val.len == 0 {
if val == '' {
return error('empty string')
}
}