1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

builtin: replace isnil calls for perfomance

This commit is contained in:
Alexander Medvednikov
2020-04-27 07:13:36 +02:00
parent e523540f3a
commit ef26f27753
3 changed files with 5 additions and 5 deletions

View File

@@ -333,7 +333,7 @@ pub fn (s string) u64() u64 {
// ==
fn (s string) eq(a string) bool {
if isnil(s.str) {
if s.str == 0 {
// should never happen
panic('string.eq(): nil string')
}