mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
std.fmt: delete deprecated APIs
std.fmt.Formatter -> std.fmt.Alt std.fmt.format -> std.Io.Writer.print
This commit is contained in:
+2
-2
@@ -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 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user