Skip to content

Commit 7213b0e

Browse files
authored
std.Io.Writer.print: support .enum_literal in 't' format specifier
1 parent 9161923 commit 7213b0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/Io/Writer.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ pub fn printValue(
11611161
},
11621162
't' => switch (@typeInfo(T)) {
11631163
.error_set => return w.alignBufferOptions(@errorName(value), options),
1164-
.@"enum", .@"union" => return w.alignBufferOptions(@tagName(value), options),
1164+
.@"enum", .enum_literal, .@"union" => return w.alignBufferOptions(@tagName(value), options),
11651165
else => invalidFmtError(fmt, value),
11661166
},
11671167
else => {},

0 commit comments

Comments
 (0)