| ... | ... | @@ -851,19 +851,16 @@ pub fn printValue( |
| 851 | 851 | .pointer => |info| switch (info.size) { |
| 852 | 852 | .one, .slice => { |
| 853 | 853 | const slice: []const u8 = value; |
| 854 | | optionsForbidden(options); // Alignment not allowed on strings. |
| 855 | | return w.writeAll(slice); |
| 854 | return w.alignBufferOptions(slice, options); |
| 856 | 855 | }, |
| 857 | 856 | .many, .c => { |
| 858 | 857 | const slice: [:0]const u8 = std.mem.span(value); |
| 859 | | optionsForbidden(options); // Alignment not allowed on strings. |
| 860 | | return w.writeAll(slice); |
| 858 | return w.alignBufferOptions(slice, options); |
| 861 | 859 | }, |
| 862 | 860 | }, |
| 863 | 861 | .array => { |
| 864 | 862 | const slice: []const u8 = &value; |
| 865 | | optionsForbidden(options); // Alignment not allowed on strings. |
| 866 | | return w.writeAll(slice); |
| 863 | return w.alignBufferOptions(slice, options); |
| 867 | 864 | }, |
| 868 | 865 | else => invalidFmtError(fmt, value), |
| 869 | 866 | }, |
| ... | ... | @@ -1118,8 +1115,7 @@ pub fn printValue( |
| 1118 | 1115 | .@"fn" => @compileError("unable to format function body type, use '*const " ++ @typeName(T) ++ "' for a function pointer type"), |
| 1119 | 1116 | .type => { |
| 1120 | 1117 | if (!is_any and fmt.len != 0) invalidFmtError(fmt, value); |
| 1121 | | optionsForbidden(options); |
| 1122 | | return w.writeAll(@typeName(value)); |
| 1118 | return w.alignBufferOptions(@typeName(value), options); |
| 1123 | 1119 | }, |
| 1124 | 1120 | .enum_literal => { |
| 1125 | 1121 | if (!is_any and fmt.len != 0) invalidFmtError(fmt, value); |