mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-05-16 04:55:27 +03:00
std.fmt: Remove bufPrintZ() in favor of bufPrintSentinel()
This commit is contained in:
@@ -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 },
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user