commit 03b3cd0618624f01514ace79b0b98eb8d8eb4b03
parent 30fa24a2264d49d59c5ab52b1dfdb81e4736b4b4
Author: Drew DeVault <sir@cmpwn.com>
Date: Sun, 2 Jan 2022 14:08:11 +0100
wc: update strio usage
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/wc.ha b/wc.ha
@@ -129,21 +129,21 @@ fn print(mode: items, result: *counts, path: str) (void | main::error) = {
static let fmtbuf: [32]u8 = [0...];
let buf = strio::fixed(fmtbuf);
if (mode & items::LINES > 0) {
- strio::concat(buf, "{0: 7} ")!;
+ strio::concat(&buf, "{0: 7} ")!;
};
if (mode & items::WORDS > 0) {
- strio::concat(buf, "{1: 7} ")!;
+ strio::concat(&buf, "{1: 7} ")!;
};
if (mode & items::BYTES > 0) {
- strio::concat(buf, "{2: 7} ")!;
+ strio::concat(&buf, "{2: 7} ")!;
};
if (mode & items::CHARS > 0) {
- strio::concat(buf, "{3: 7} ")!;
+ strio::concat(&buf, "{3: 7} ")!;
};
if (path != "") {
- strio::concat(buf, "{4}")!;
+ strio::concat(&buf, "{4}")!;
};
- const format = strings::rtrim(strio::string(buf));
+ const format = strings::rtrim(strio::string(&buf));
fmt::printfln(format, result.lines, result.words,
result.bytes, result.chars, path)?;
};