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:
@@ -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')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user