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

all: migrate to the new Option (p. 1) (#8924)

This commit is contained in:
spaceface
2021-02-28 20:24:29 +01:00
committed by GitHub
parent e354dcefc2
commit b9a381f101
34 changed files with 244 additions and 214 deletions

View File

@ -15,7 +15,7 @@ fn (mut ws Client) socket_read(mut buffer []byte) ?int {
} else {
for {
r := ws.conn.read(mut buffer) or {
if errcode == net.err_timed_out_code {
if err.code == net.err_timed_out_code {
continue
}
return error(err)
@ -39,7 +39,7 @@ fn (mut ws Client) socket_read_ptr(buf_ptr byteptr, len int) ?int {
} else {
for {
r := ws.conn.read_ptr(buf_ptr, len) or {
if errcode == net.err_timed_out_code {
if err.code == net.err_timed_out_code {
continue
}
return error(err)
@ -63,7 +63,7 @@ fn (mut ws Client) socket_write(bytes []byte) ?int {
} else {
for {
n := ws.conn.write(bytes) or {
if errcode == net.err_timed_out_code {
if err.code == net.err_timed_out_code {
continue
}
return error(err)