mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
v: vet for empty string conditions (#21529)
This commit is contained in:
parent
6752ce8914
commit
f7e820cdeb
22 changed files with 45 additions and 48 deletions
|
@ -25,7 +25,7 @@ pub enum ValueKind {
|
|||
|
||||
// check_json
|
||||
fn check_json(val string) ! {
|
||||
if val.len == 0 {
|
||||
if val == '' {
|
||||
return error('empty string')
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue