std.fmt: Remove bufPrintZ() in favor of bufPrintSentinel()

This commit is contained in:
Linus Groh
2026-05-03 21:04:49 +01:00
parent a794287573
commit cd10ce9a67
2 changed files with 1 additions and 6 deletions
+1 -1
View File
@@ -13851,7 +13851,7 @@ fn netLookupFallible(
const name_c = name_buffer[0..name.len :0];
var port_buffer: [8]u8 = undefined;
const port_c = std.fmt.bufPrintZ(&port_buffer, "{d}", .{options.port}) catch unreachable;
const port_c = std.fmt.bufPrintSentinel(&port_buffer, "{d}", .{options.port}, 0) catch unreachable;
const hints: posix.addrinfo = .{
.flags = .{ .CANONNAME = options.canonical_name_buffer != null, .NUMERICSERV = true },
-5
View File
@@ -602,11 +602,6 @@ pub fn bufPrint(buf: []u8, comptime fmt: []const u8, args: anytype) BufPrintErro
return w.buffered();
}
/// Deprecated in favor of `bufPrintSentinel`
pub fn bufPrintZ(buf: []u8, comptime fmt: []const u8, args: anytype) BufPrintError![:0]u8 {
return try bufPrintSentinel(buf, fmt, args, 0);
}
pub fn bufPrintSentinel(
buf: []u8,
comptime fmt: []const u8,