authorgravatar for alex_naskos@hotmail.comAlexandros Naskos <alex_naskos@hotmail.com> 2020-10-02 00:39:19+03:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2020-10-02 00:39:19+03:00
loga4fe438d3940d0beff16c939e991fdff24eb6ba2
treeb00c71296e76654bfb85e956490a8b1fcb36ead2
parent49c0cd6e8ef2efcd2c7edc8b41fc8c0a10c8b350
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

std.fmt.comptimePrint: bufPrint cannot return an error


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

lib/std/fmt.zig+1-1
...@@ -1183,7 +1183,7 @@ fn bufPrintIntToSlice(buf: []u8, value: anytype, base: u8, uppercase: bool, opti...@@ -1183,7 +1183,7 @@ fn bufPrintIntToSlice(buf: []u8, value: anytype, base: u8, uppercase: bool, opti
11831183
1184pub fn comptimePrint(comptime fmt: []const u8, args: anytype) *const [count(fmt, args)]u8 {1184pub fn comptimePrint(comptime fmt: []const u8, args: anytype) *const [count(fmt, args)]u8 {
1185 comptime var buf: [count(fmt, args)]u8 = undefined;1185 comptime var buf: [count(fmt, args)]u8 = undefined;
1186 _ = bufPrint(&buf, fmt, args) catch |err| @compileError(err);1186 _ = bufPrint(&buf, fmt, args) catch unreachable;
1187 return &buf;1187 return &buf;
1188}1188}
11891189