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

tests: fix deprecation warning in tcp_test.v

This commit is contained in:
Delyan Angelov 2022-08-15 15:17:00 +03:00
parent 6fdcc5bcd0
commit 26986eb2f8
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -42,7 +42,7 @@ fn echo(address string) ? {
data := 'Hello from vlib/net!'
c.write_string(data)?
mut buf := []u8{len: 4096}
read := c.read(mut buf)?
read := c.read(mut buf) or { panic(err) }
assert read == data.len
for i := 0; i < read; i++ {
assert buf[i] == data[i]