normal destructuring with one line changed
This commit is contained in:
@@ -291,7 +291,7 @@ func main[argc: i64, argv: ptr] : i64
|
||||
c := new CHIP8
|
||||
c->init()
|
||||
|
||||
~buffer, ok := io.read_binary_file(path)
|
||||
buffer, ok := io.read_binary_file(path)
|
||||
if !ok
|
||||
panic("failed to read file")
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ func main[argc: i64, argv: ptr] : i64
|
||||
if i < url_len
|
||||
path = url->substr(i, url_len - i)
|
||||
|
||||
~s, ok := net.connect(host, 80)
|
||||
s, ok := net.connect(host, 80)
|
||||
if !ok
|
||||
panic("failed to connect")
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ include "std/io.zr"
|
||||
include "std/net.zr"
|
||||
|
||||
func main[] : i64
|
||||
~s, ok := net.listen("127.0.0.1", 8000)
|
||||
s, ok := net.listen("127.0.0.1", 8000)
|
||||
if !ok
|
||||
panic("failed to listen")
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ include "std/io.zr"
|
||||
include "std/net.zr"
|
||||
|
||||
func main[] : i64
|
||||
~s, ok := net.create_udp_server("127.0.0.1", 8000)
|
||||
s, ok := net.create_udp_server("127.0.0.1", 8000)
|
||||
if !ok
|
||||
panic("net.create_udp_server failed")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user