~sircmpwn/hare-message

047e5111c5d2e690d82ba278297d343e39453527 — Conrad Hoffmann 5 months ago 97dfc95
message: more stdlib changes

Signed-off-by: Conrad Hoffmann <ch@bitfehler.net>
1 files changed, 4 insertions(+), 4 deletions(-)

M message/header.ha
M message/header.ha => message/header.ha +4 -4
@@ 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 =>