commit 681c90dc5ecc946991f2956fa0dfd3e048bb3eef
parent 9244d60cf6ab00f16fd5663f247c7e9f33812762
Author: Drew DeVault <sir@cmpwn.com>
Date: Mon, 1 Feb 2021 19:24:59 -0500
fmt: style
Diffstat:
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/fmt/fmt.ha b/fmt/fmt.ha
@@ -54,15 +54,13 @@ export fn fprintf(
return n;
};
-fn format(out: *io::stream, arg: formattable) void = {
- match (arg) {
- // TODO: Use types::numeric (and strconv::numtos) when match is
- // more fleshed out
- i: int => {
- let s = strconv::itos(i);
- io::write(out, strings::to_utf8(s));
- },
- s: str => io::write(out, strings::to_utf8(s)),
- * => abort("TODO: implement more formattable values"),
- };
+fn format(out: *io::stream, arg: formattable) void = match (arg) {
+ // TODO: Use types::numeric (and strconv::numtos) when match is
+ // more fleshed out
+ i: int => {
+ let s = strconv::itos(i);
+ io::write(out, strings::to_utf8(s));
+ },
+ s: str => io::write(out, strings::to_utf8(s)),
+ * => abort("TODO: implement more formattable values"),
};