| ... | @@ -1004,8 +1004,7 @@ pub fn formatAsciiChar( | ... | @@ -1004,8 +1004,7 @@ pub fn formatAsciiChar( |
| 1004 | options: FormatOptions, | 1004 | options: FormatOptions, |
| 1005 | writer: anytype, | 1005 | writer: anytype, |
| 1006 | ) !void { | 1006 | ) !void { |
| 1007 | _ = options; | 1007 | return formatBuf(@as(*const [1]u8, &c), options, writer); |
| 1008 | return writer.writeAll(@as(*const [1]u8, &c)); | | |
| 1009 | } | 1008 | } |
| 1010 | | 1009 | |
| 1011 | pub fn formatUnicodeCodepoint( | 1010 | pub fn formatUnicodeCodepoint( |
| ... | @@ -2724,6 +2723,9 @@ test "padding" { | ... | @@ -2724,6 +2723,9 @@ test "padding" { |
| 2724 | try expectFmt("==crêpe===", "{s:=^10}", .{"crêpe"}); | 2723 | try expectFmt("==crêpe===", "{s:=^10}", .{"crêpe"}); |
| 2725 | try expectFmt("=====crêpe", "{s:=>10}", .{"crêpe"}); | 2724 | try expectFmt("=====crêpe", "{s:=>10}", .{"crêpe"}); |
| 2726 | try expectFmt("crêpe=====", "{s:=<10}", .{"crêpe"}); | 2725 | try expectFmt("crêpe=====", "{s:=<10}", .{"crêpe"}); |
| | 2726 | try expectFmt("====a", "{c:=>5}", .{'a'}); |
| | 2727 | try expectFmt("==a==", "{c:=^5}", .{'a'}); |
| | 2728 | try expectFmt("a====", "{c:=<5}", .{'a'}); |
| 2727 | } | 2729 | } |
| 2728 | | 2730 | |
| 2729 | test "decimal float padding" { | 2731 | test "decimal float padding" { |