We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e80d7f commit f6a251fCopy full SHA for f6a251f
lib/std/fmt.zig
@@ -260,8 +260,8 @@ pub const Placeholder = struct {
260
const alignment: ?Alignment = comptime if (parser.peek(0)) |ch| init: {
261
switch (ch) {
262
'<', '^', '>' => {
263
- _ = parser.char(); // consume the character
264
- break :init switch (ch) {
+ // consume the character
+ break :init switch (parser.char().?) {
265
'<' => .left,
266
'^' => .center,
267
else => .right,
@@ -278,8 +278,7 @@ pub const Placeholder = struct {
278
279
'1'...'9', '.' => break :init null,
280
else => {
281
282
- break :init ch;
+ break :init parser.char().?;
283
},
284
}
285
} else null;
0 commit comments