mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
std.fmt.comptimePrint: bufPrint cannot return an error
This commit is contained in:
parent
49c0cd6e8e
commit
a4fe438d39
1 changed files with 1 additions and 1 deletions
|
|
@ -1183,7 +1183,7 @@ fn bufPrintIntToSlice(buf: []u8, value: anytype, base: u8, uppercase: bool, opti
|
|||
|
||||
pub fn comptimePrint(comptime fmt: []const u8, args: anytype) *const [count(fmt, args)]u8 {
|
||||
comptime var buf: [count(fmt, args)]u8 = undefined;
|
||||
_ = bufPrint(&buf, fmt, args) catch |err| @compileError(err);
|
||||
_ = bufPrint(&buf, fmt, args) catch unreachable;
|
||||
return &buf;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue