Skip to content

Commit 9cd776a

Browse files
rework how characters identified as valid are consumed
1 parent 5b4db03 commit 9cd776a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/std/fmt.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ pub const Placeholder = struct {
258258
const alignment: ?Alignment = comptime if (parser.peek(0)) |ch| init: {
259259
switch (ch) {
260260
'<', '^', '>' => {
261-
_ = parser.char(); // consume the character
262-
break :init switch (ch) {
261+
// consume the character
262+
break :init switch (parser.char().?) {
263263
'<' => .left,
264264
'^' => .center,
265265
else => .right,

0 commit comments

Comments
 (0)