@@ 316,7 316,7 @@ export fn read_header(
// TODO: leaks on error
let head = new_header();
match (bufio::scanbyte(&rd)?) {
match (bufio::read_byte(&rd)?) {
case let b: u8 =>
// Cannot start with a leading space
if (b == ' ' || b == '\t') {
@@ 636,7 636,7 @@ fn write_continued(sink: *memio::stream, v: []u8) void = {
fn read_continued(
rd: *bufio::stream,
) ([]u8 | errors::invalid | io::error) = {
let line = match (bufio::scanline(rd)?) {
let line = match (bufio::read_line(rd)?) {
case let line: []u8 =>
yield bytes::rtrim(line, '\r');
case io::EOF =>
@@ 649,7 649,7 @@ fn read_continued(
append(line, ['\r', '\n']...);
for (has_continuation(rd)?) {
const cont = match (bufio::scanline(rd)?) {
const cont = match (bufio::read_line(rd)?) {
case let line: []u8 =>
yield bytes::rtrim(line, '\r');
case io::EOF =>
@@ 667,7 667,7 @@ fn read_continued(
fn has_continuation(
rd: *bufio::stream,
) (bool | io::error) = {
const b = match (bufio::scanbyte(rd)?) {
const b = match (bufio::read_byte(rd)?) {
case let b: u8 =>
yield b;
case io::EOF =>