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
|
assert(req.target.scheme == "http"); // TODO: https
|
||||||
const conn = dial::dial_uri("tcp", req.target)?;
|
const conn = dial::dial_uri("tcp", req.target)?;
|
||||||
|
|
||||||
let buf: [os::BUFSIZ]u8 = [0...];
|
let buf: [os::BUFSZ]u8 = [0...];
|
||||||
let file = bufio::buffered(conn, [], buf);
|
let file = bufio::init(conn, [], buf);
|
||||||
bufio::setflush(&file, []);
|
bufio::setflush(&file, []);
|
||||||
|
|
||||||
fmt::fprintf(&file, "{} ", req.method)?;
|
fmt::fprintf(&file, "{} ", req.method)?;
|
||||||
|
|
|
@ -116,7 +116,7 @@ fn new_reader(
|
||||||
type identity_reader = struct {
|
type identity_reader = struct {
|
||||||
vtable: io::stream,
|
vtable: io::stream,
|
||||||
conn: io::handle,
|
conn: io::handle,
|
||||||
buffer: [os::BUFSIZ]u8,
|
buffer: [os::BUFSZ]u8,
|
||||||
pending: size,
|
pending: size,
|
||||||
length: size,
|
length: size,
|
||||||
};
|
};
|
||||||
|
@ -189,7 +189,7 @@ type chunk_state = enum {
|
||||||
type chunked_reader = struct {
|
type chunked_reader = struct {
|
||||||
vtable: io::stream,
|
vtable: io::stream,
|
||||||
conn: io::handle,
|
conn: io::handle,
|
||||||
buffer: [os::BUFSIZ]u8,
|
buffer: [os::BUFSZ]u8,
|
||||||
state: chunk_state,
|
state: chunk_state,
|
||||||
// Amount of read-ahead data in buffer
|
// Amount of read-ahead data in buffer
|
||||||
pending: size,
|
pending: size,
|
||||||
|
|
Loading…
Reference in a new issue