authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-08 14:48:50 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-06-08 14:48:50 -07:00
log6e45c4207fb2e1fc7fb2dbd3ecff28d2a3bfd92c
treedc58d5293386af896601bd7fedffcf767aaaf295
parent181ea08310f97273d8e774a3415987e03ae606f9
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

fmt: make the 'format' compile error a bit more relaxed


1 files changed, 1 insertions(+), 1 deletions(-)

fmt.zig+1-1
...@@ -424,7 +424,7 @@ fn formatType(value: anytype, comptime fmt: []const u8, options: FormatOptions,...@@ -424,7 +424,7 @@ fn formatType(value: anytype, comptime fmt: []const u8, options: FormatOptions,
424 return formatAddress(value, options, writer);424 return formatAddress(value, options, writer);
425 }425 }
426426
427 if (comptime std.meta.hasMethod(T, "format")) {427 if (comptime std.meta.hasMethod(T, "format") and @typeInfo(@TypeOf(T.format)).@"fn".params[1].type.? != *std.Io.Writer) {
428 @compileError("fix this: " ++ @typeName(T));428 @compileError("fix this: " ++ @typeName(T));
429 }429 }
430 if (std.meta.hasMethod(T, "nprint")) {430 if (std.meta.hasMethod(T, "nprint")) {