mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
vlib: refactor empty string checks to use s == ''
or s != ''
, instead of s.len == 0
(#21300)
This commit is contained in:
parent
46be635072
commit
8aa9314a99
55 changed files with 95 additions and 96 deletions
|
@ -75,7 +75,7 @@ pub fn (doc XMLDocument) validate() !XMLDocument {
|
|||
new_root := doc.root.validate(elements, entities)!
|
||||
|
||||
// Check the DOCTYPE name matches the root name
|
||||
if doc.doctype.name.len > 0 && doc.doctype.name != new_root.name {
|
||||
if doc.doctype.name != '' && doc.doctype.name != new_root.name {
|
||||
return error('Root element ${new_root.name} does not match DOCTYPE ${doc.doctype.name}')
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue