commit 2424c0e23ae800edd1322332dd5d4a138b52bf5e
parent 1704eb8ddae55d4a0b1e559dd0ce281cb468870f
Author: Eyal Sawady <ecs@d2evs.net>
Date: Sat, 27 Feb 2021 18:59:50 -0500
main.ha: use fmt::print when appropriate
And replace fmt::println with fmt::printfln
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/main.ha b/main.ha
@@ -16,18 +16,18 @@ export fn main() void = {
};
let hash = hex::encode(ver.hash);
- fmt::println("{}: {}", hash, os::args[1]);
- fmt::println("{} inputs", len(ver.inputs));
+ fmt::printfln("{}: {}", hash, os::args[1]);
+ fmt::println(len(ver.inputs), "inputs");
for (let i = 0z; i < len(ver.inputs); i += 1) {
let hash = hex::encode(ver.inputs[i].hash);
defer free(hash);
- fmt::println("\t{} {}", hash, ver.inputs[i].path as str);
+ fmt::printfln("\t{} {}", hash, ver.inputs[i].path as str);
};
- fmt::println("{} dependencies", len(ver.depends));
+ fmt::println(len(ver.depends), "dependencies");
for (let i = 0z; i < len(ver.depends); i += 1) {
let ident = ver.depends[i];
- fmt::printf("\t");
+ fmt::print("\t");
for (let j = 0z; j < len(ident); j += 1) {
fmt::printf("{}{}", ident[j],
if (j + 1 < len(ident)) "::"