vlib/io: fix reader bugs, make read_all take a config struct (#7361)

This commit is contained in:
Emily Hudson 2020-12-16 17:22:26 +00:00 committed by GitHub
parent 1a2c7cd336
commit 553ecf63e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 227 additions and 75 deletions

View file

@ -8,7 +8,7 @@ fn main() {
// Simple http HEAD request for a file
conn.write_str('HEAD /index.html HTTP/1.0\r\n\r\n')?
// Read all the data that is waiting
result := io.read_all(conn)?
result := io.read_all(reader: conn)?
// Cast to string and print result
println(result.bytestr())
}