Fix compilation with latest stdlib
This commit is contained in:
parent
c203af3f8b
commit
372eb47e4a
|
@ -18,8 +18,8 @@ export fn do(client: *client, req: *request) (response | error) = {
|
|||
assert(req.target.scheme == "http"); // TODO: https
|
||||
const conn = dial::dial_uri("tcp", req.target)?;
|
||||
|
||||
let buf: [os::BUFSIZ]u8 = [0...];
|
||||
let file = bufio::buffered(conn, [], buf);
|
||||
let buf: [os::BUFSZ]u8 = [0...];
|
||||
let file = bufio::init(conn, [], buf);
|
||||
bufio::setflush(&file, []);
|
||||
|
||||
fmt::fprintf(&file, "{} ", req.method)?;
|
||||
|
|
|
@ -116,7 +116,7 @@ fn new_reader(
|
|||
type identity_reader = struct {
|
||||
vtable: io::stream,
|
||||
conn: io::handle,
|
||||
buffer: [os::BUFSIZ]u8,
|
||||
buffer: [os::BUFSZ]u8,
|
||||
pending: size,
|
||||
length: size,
|
||||
};
|
||||
|
@ -189,7 +189,7 @@ type chunk_state = enum {
|
|||
type chunked_reader = struct {
|
||||
vtable: io::stream,
|
||||
conn: io::handle,
|
||||
buffer: [os::BUFSIZ]u8,
|
||||
buffer: [os::BUFSZ]u8,
|
||||
state: chunk_state,
|
||||
// Amount of read-ahead data in buffer
|
||||
pending: size,
|
||||
|
|
Loading…
Reference in a new issue