authorgravatar for cdavis4short@gmail.comorvit <cdavis4short@gmail.com> 2024-05-21 09:41:49-05:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-05-21 14:41:49+00:00
logae44e199a8caa8d26db04b81867acb81d54ba217
tree930c2d7f62ee3de4628c7b5357d17369b89ace29
parentaa0736651346304199cebc8ea97bebbcde0491e3
signaturebadge-check Signed by PGP key B5690EEEBB952194

use constant in formatType


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

lib/std/fmt.zig+1-1
......@@ -480,7 +480,7 @@ pub fn formatType(
480480) @TypeOf(writer).Error!void {
481481 const T = @TypeOf(value);
482482 const actual_fmt = comptime if (std.mem.eql(u8, fmt, ANY))
483 defaultSpec(@TypeOf(value))
483 defaultSpec(T)
484484 else if (fmt.len != 0 and (fmt[0] == '?' or fmt[0] == '!')) switch (@typeInfo(T)) {
485485 .Optional, .ErrorUnion => fmt,
486486 else => stripOptionalOrErrorUnionSpec(fmt),