std.fmt: delete deprecated APIs

std.fmt.Formatter -> std.fmt.Alt
std.fmt.format -> std.Io.Writer.print
This commit is contained in:
Andrew Kelley
2025-08-30 14:50:33 -07:00
parent ab99dd9c5d
commit 150169f1e0
55 changed files with 127 additions and 141 deletions
+2 -2
View File
@@ -893,7 +893,7 @@ fn formatUtf8(utf8: []const u8, writer: *std.Io.Writer) std.Io.Writer.Error!void
/// Ill-formed UTF-8 byte sequences are replaced by the replacement character (U+FFFD)
/// according to "U+FFFD Substitution of Maximal Subparts" from Chapter 3 of
/// the Unicode standard, and as specified by https://encoding.spec.whatwg.org/#utf-8-decoder
pub fn fmtUtf8(utf8: []const u8) std.fmt.Formatter([]const u8, formatUtf8) {
pub fn fmtUtf8(utf8: []const u8) std.fmt.Alt([]const u8, formatUtf8) {
return .{ .data = utf8 };
}
@@ -1483,7 +1483,7 @@ fn formatUtf16Le(utf16le: []const u16, writer: *std.Io.Writer) std.Io.Writer.Err
/// Return a Formatter for a (potentially ill-formed) UTF-16 LE string,
/// which will be converted to UTF-8 during formatting.
/// Unpaired surrogates are replaced by the replacement character (U+FFFD).
pub fn fmtUtf16Le(utf16le: []const u16) std.fmt.Formatter([]const u16, formatUtf16Le) {
pub fn fmtUtf16Le(utf16le: []const u16) std.fmt.Alt([]const u16, formatUtf16Le) {
return .{ .data = utf16le };
}