mirror of
https://github.com/ziglang/zig.git
synced 2026-01-15 11:55:14 +00:00
This saves on comptime format string parsing, as the compiler caches comptime calls. The catch here, is that parsePlaceHolder cannot take the placeholder string as a slice. It must take it as an array by value for the caching to occure. There is also some logic in here that ensures that the specifier_arg is always them same slice when the items they contain are the same. This makes the compiler stamp out less copies of formatType.