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 a984a7c commit 94dd8ceCopy full SHA for 94dd8ce
lib/std/fmt.zig
@@ -259,8 +259,8 @@ pub const Placeholder = struct {
259
const alignment: ?Alignment = comptime if (parser.peek(0)) |ch| init: {
260
switch (ch) {
261
'<', '^', '>' => {
262
- _ = parser.char(); // consume the character
263
- break :init switch (ch) {
+ // consume the character
+ break :init switch (parser.char().?) {
264
'<' => .left,
265
'^' => .center,
266
else => .right,
@@ -277,8 +277,7 @@ pub const Placeholder = struct {
277
278
'1'...'9', '.' => break :init null,
279
else => {
280
281
- break :init ch;
+ break :init parser.char().?;
282
},
283
}
284
} else null;
0 commit comments