hautils

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b67c9fa5decb33dc2f2b07a43f191d3b66264c99
parent 44d5fc5b2da3c3b54bcd932869380d8a40213dcc
Author: Byron Torres <b@torresjrjr.com>
Date:   Thu, 28 Apr 2022 23:00:10 +0100

Revert "nl: fix invalid error propagation"

This reverts commit 9efbbdbfab68a665e0ce60f92407645b37d56ba0.

Reverted commit was made redundant by this commit:
    15a34b2c66486c6a8f168f004d1d1af2396788a1
    "nl: propagate errors in println"

Diffstat:
Mnl.ha | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/nl.ha b/nl.ha @@ -238,28 +238,28 @@ fn println(line: str, style: style, ctx: *context) (void | io::error) = { switch (style) { case style::ALL => if (!isblank(line)) { - fmt::printf("{%}", ctx.linenum, ctx.mod)!; - fmt::print(ctx.sep)!; + fmt::printf("{%}", ctx.linenum, ctx.mod)?; + fmt::print(ctx.sep)?; ctx.linenum += ctx.incr; ctx.conblanks = 0; } else { ctx.conblanks += 1; if (ctx.conblanks == ctx.maxblanks) { - fmt::printf("{%}", ctx.linenum, ctx.mod)!; - fmt::print(ctx.sep)!; + fmt::printf("{%}", ctx.linenum, ctx.mod)?; + fmt::print(ctx.sep)?; ctx.linenum += ctx.incr; ctx.conblanks = 0; }; }; case style::TXT => if (!isblank(line)) { - fmt::printf("{%}", ctx.linenum, ctx.mod)!; - fmt::print(ctx.sep)!; + fmt::printf("{%}", ctx.linenum, ctx.mod)?; + fmt::print(ctx.sep)?; ctx.linenum += ctx.incr; }; case style::NON => void; }; - fmt::println(line)!; + fmt::println(line)?; }; fn isblank(line: str) bool = {