diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-08-31 19:28:21 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-31 19:28:21 -0700 |
| commit | 4c01a6553a1efef727b4f1cf7bb8dd9e53bd3cd5 (patch) | |
| tree | 122051721252ae70676f0be27b1978d8caf7bb48 /lib/std/unicode.zig | |
| parent | 3aa31ffd868973b202907e504ce8f38571887ee2 (diff) | |
| parent | ec36e0609fb97fef96e72fb76f5515b751519a61 (diff) | |
| download | zig-4c01a6553a1efef727b4f1cf7bb8dd9e53bd3cd5.tar.gz zig-4c01a6553a1efef727b4f1cf7bb8dd9e53bd3cd5.zip | |
Merge pull request #25088 from ziglang/delete-deprecated-fmt
std.fmt: delete deprecated APIs
Diffstat (limited to 'lib/std/unicode.zig')
| -rw-r--r-- | lib/std/unicode.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/unicode.zig b/lib/std/unicode.zig index a248e983e4..7fbf1094ba 100644 --- a/lib/std/unicode.zig +++ b/lib/std/unicode.zig @@ -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 }; } |
