From cd10ce9a67668bfdf1fd7ba57b499d93caa3c00f Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sun, 3 May 2026 21:04:49 +0100 Subject: [PATCH] std.fmt: Remove bufPrintZ() in favor of bufPrintSentinel() --- lib/std/Io/Threaded.zig | 2 +- lib/std/fmt.zig | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/std/Io/Threaded.zig b/lib/std/Io/Threaded.zig index 9cac2f12a4..7b0541f2b1 100644 --- a/lib/std/Io/Threaded.zig +++ b/lib/std/Io/Threaded.zig @@ -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 }, diff --git a/lib/std/fmt.zig b/lib/std/fmt.zig index 1fccc065de..b6b58ed747 100644 --- a/lib/std/fmt.zig +++ b/lib/std/fmt.zig @@ -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,