aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-07-28 11:10:51 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-07-29 02:29:36 -0700
commit11d38a7e520f485206b7b010f64127d864194e4c (patch)
treedd168778189857a4a0d2e7fedce53870a94487b0 /src/ir.cpp
parent4fdfaf69c8c55ebac4c5b3c00025c0ac51281b5b (diff)
downloadzig-11d38a7e520f485206b7b010f64127d864194e4c.tar.gz
zig-11d38a7e520f485206b7b010f64127d864194e4c.zip
std.fmt.format: small optimization to avoid runtime bloat
When there are no format parameters, it simply calls `writeAll`. This has the effect of no longer emitting a compile error for using `{}` and not having any parameters, however, at this point in the development process of Zig I think that tradeoff is worthwhile. On the other hand, it might be OK to simply define formatting to work this way. It's a common pattern to use the formatting function's format string `"like this", .{}` instead of `"{}", .{"like this"}`, which can lead to accidentally putting control characters in the formatting string, however, with this change that works just fine.
Diffstat (limited to 'src/ir.cpp')
0 files changed, 0 insertions, 0 deletions