aboutsummaryrefslogtreecommitdiff
path: root/src/link/Wasm.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-07-05 10:43:14 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-07-07 22:43:53 -0700
commit5378fdb153bc76990105e3640e7725e434e8cdee (patch)
tree9791e08538c10c521f5634ed79e3b369fcd004df /src/link/Wasm.zig
parent4ccc6f2b5777afd06f0fddbea4e0e0d0c92b007d (diff)
downloadzig-5378fdb153bc76990105e3640e7725e434e8cdee.tar.gz
zig-5378fdb153bc76990105e3640e7725e434e8cdee.zip
std.fmt: fully remove format string from format methods
Introduces `std.fmt.alt` which is a helper for calling alternate format methods besides one named "format".
Diffstat (limited to 'src/link/Wasm.zig')
-rw-r--r--src/link/Wasm.zig6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/link/Wasm.zig b/src/link/Wasm.zig
index d7c8b687e9..74c30c0c18 100644
--- a/src/link/Wasm.zig
+++ b/src/link/Wasm.zig
@@ -2126,8 +2126,7 @@ pub const FunctionType = extern struct {
wasm: *const Wasm,
ft: FunctionType,
- pub fn format(self: Formatter, writer: *std.io.Writer, comptime f: []const u8) std.io.Writer.Error!void {
- comptime assert(f.len == 0);
+ pub fn format(self: Formatter, writer: *std.io.Writer) std.io.Writer.Error!void {
const params = self.ft.params.slice(self.wasm);
const returns = self.ft.returns.slice(self.wasm);
@@ -2906,8 +2905,7 @@ pub const Feature = packed struct(u8) {
@"=",
};
- pub fn format(feature: Feature, writer: *std.io.Writer, comptime fmt: []const u8) std.io.Writer.Error!void {
- comptime assert(fmt.len == 0);
+ pub fn format(feature: Feature, writer: *std.io.Writer) std.io.Writer.Error!void {
try writer.print("{s} {s}", .{ @tagName(feature.prefix), @tagName(feature.tag) });
}