| ... | ... | @@ -524,7 +524,7 @@ pub fn formatType( |
| 524 | 524 | if (actual_fmt.len == 0) |
| 525 | 525 | @compileError("cannot format array ref without a specifier (i.e. {s} or {*})"); |
| 526 | 526 | if (info.child == u8) { |
| 527 | | if (comptime mem.indexOfScalar(u8, "sxXeEzZ", actual_fmt[0]) != null) { |
| 527 | if (comptime mem.indexOfScalar(u8, "sxXeE", actual_fmt[0]) != null) { |
| 528 | 528 | return formatText(value, actual_fmt, options, writer); |
| 529 | 529 | } |
| 530 | 530 | } |
| ... | ... | @@ -542,7 +542,7 @@ pub fn formatType( |
| 542 | 542 | return formatType(mem.span(value), actual_fmt, options, writer, max_depth); |
| 543 | 543 | } |
| 544 | 544 | if (ptr_info.child == u8) { |
| 545 | | if (comptime mem.indexOfScalar(u8, "sxXeEzZ", actual_fmt[0]) != null) { |
| 545 | if (comptime mem.indexOfScalar(u8, "sxXeE", actual_fmt[0]) != null) { |
| 546 | 546 | return formatText(mem.span(value), actual_fmt, options, writer); |
| 547 | 547 | } |
| 548 | 548 | } |
| ... | ... | @@ -555,7 +555,7 @@ pub fn formatType( |
| 555 | 555 | return writer.writeAll("{ ... }"); |
| 556 | 556 | } |
| 557 | 557 | if (ptr_info.child == u8) { |
| 558 | | if (comptime mem.indexOfScalar(u8, "sxXeEzZ", actual_fmt[0]) != null) { |
| 558 | if (comptime mem.indexOfScalar(u8, "sxXeE", actual_fmt[0]) != null) { |
| 559 | 559 | return formatText(value, actual_fmt, options, writer); |
| 560 | 560 | } |
| 561 | 561 | } |
| ... | ... | @@ -576,7 +576,7 @@ pub fn formatType( |
| 576 | 576 | return writer.writeAll("{ ... }"); |
| 577 | 577 | } |
| 578 | 578 | if (info.child == u8) { |
| 579 | | if (comptime mem.indexOfScalar(u8, "sxXeEzZ", actual_fmt[0]) != null) { |
| 579 | if (comptime mem.indexOfScalar(u8, "sxXeE", actual_fmt[0]) != null) { |
| 580 | 580 | return formatText(&value, actual_fmt, options, writer); |
| 581 | 581 | } |
| 582 | 582 | } |
| ... | ... | @@ -658,8 +658,6 @@ pub fn formatIntValue( |
| 658 | 658 | } else { |
| 659 | 659 | @compileError("Cannot print integer that is larger than 8 bits as a ascii"); |
| 660 | 660 | } |
| 661 | | } else if (comptime std.mem.eql(u8, fmt, "Z")) { |
| 662 | | @compileError("specifier 'Z' has been deprecated, wrap your argument in std.zig.fmtEscapes instead"); |
| 663 | 661 | } else if (comptime std.mem.eql(u8, fmt, "u")) { |
| 664 | 662 | if (@typeInfo(@TypeOf(int_value)).Int.bits <= 21) { |
| 665 | 663 | return formatUnicodeCodepoint(@as(u21, int_value), options, writer); |
| ... | ... | @@ -735,10 +733,6 @@ pub fn formatText( |
| 735 | 733 | } |
| 736 | 734 | } |
| 737 | 735 | return; |
| 738 | | } else if (comptime std.mem.eql(u8, fmt, "z")) { |
| 739 | | @compileError("specifier 'z' has been deprecated, wrap your argument in std.zig.fmtId instead"); |
| 740 | | } else if (comptime std.mem.eql(u8, fmt, "Z")) { |
| 741 | | @compileError("specifier 'Z' has been deprecated, wrap your argument in std.zig.fmtEscapes instead"); |
| 742 | 736 | } else { |
| 743 | 737 | @compileError("Unsupported format string '" ++ fmt ++ "' for type '" ++ @typeName(@TypeOf(value)) ++ "'"); |
| 744 | 738 | } |