Removed references to byte; enabled -skip-unused by default
Some checks failed
ci/woodpecker/push/arch unknown status
ci/woodpecker/push/docker unknown status
ci/woodpecker/push/build_experimental Pipeline failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test Pipeline was successful

This commit is contained in:
Jef Roosens 2022-04-17 16:41:47 +02:00
parent 2c62f6bda1
commit 32d542102f
Signed by: Jef Roosens
GPG key ID: B580B976584B5F30
6 changed files with 9 additions and 41 deletions

View file

@ -28,8 +28,8 @@ fn send(req &string) ?http.Response {
s.wait_for_write() ?
mut c := 0
mut buf := []byte{len: docker.buf_len}
mut res := []byte{}
mut buf := []u8{len: docker.buf_len}
mut res := []u8{}
for {
c = s.read(mut buf) or { return error('Failed to read data from socket ${docker.socket}.') }
@ -52,7 +52,7 @@ fn send(req &string) ?http.Response {
// We loop until we've encountered the end of the chunked response
// A chunked HTTP response always ends with '0\r\n\r\n'.
for res.len < 5 || res#[-5..] != [byte(`0`), `\r`, `\n`, `\r`, `\n`] {
for res.len < 5 || res#[-5..] != [u8(`0`), `\r`, `\n`, `\r`, `\n`] {
// Wait for the server to respond
s.wait_for_write() ?