authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-26 20:31:42 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-05-26 20:31:42 -07:00
log01c643e7b070c69c402c64059af02ea881cde5f5
tree5cb05daaa878f22ca2313497ae2c523b0260c769
parent56689f8b348e4d632290f77c2f1ef42b310b6bd4
signaturebadge-check Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

fmt: handle floats


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

fmt.zig+1-2
...@@ -756,8 +756,7 @@ pub fn formatInt(value: anytype, base: u8, case: Case, options: FormatOptions, w...@@ -756,8 +756,7 @@ pub fn formatInt(value: anytype, base: u8, case: Case, options: FormatOptions, w
756fn formatValue(value: anytype, comptime fmt: []const u8, options: FormatOptions, writer: anytype) !void {756fn formatValue(value: anytype, comptime fmt: []const u8, options: FormatOptions, writer: anytype) !void {
757 const T = @TypeOf(value);757 const T = @TypeOf(value);
758 switch (@typeInfo(T)) {758 switch (@typeInfo(T)) {
759 // .float, .comptime_float => return formatFloatValue(value, fmt, options, writer),759 .float, .comptime_float => return formatFloatValue(value, fmt, options, writer),
760 .float, .comptime_float => @compileError("TODO"),
761 .int, .comptime_int => return formatIntValue(value, fmt, options, writer),760 .int, .comptime_int => return formatIntValue(value, fmt, options, writer),
762 .bool => return formatBuf(if (value) "true" else "false", options, writer),761 .bool => return formatBuf(if (value) "true" else "false", options, writer),
763 else => comptime unreachable,762 else => comptime unreachable,