Skip to content

Commit add5d7c

Browse files
simplify the code a little
1 parent 9685ed4 commit add5d7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/fmt.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ pub const Placeholder = struct {
271271
// When none of the fill character and the alignment specifier have
272272
// been provided, check whether the width starts with a zero.
273273
if (fill == null and alignment == null) {
274-
fill = comptime if (parser.peek(0)) |ch| (if (ch == '0') ch else null) else null;
274+
fill = comptime if (parser.peek(0) == '0') '0' else null;
275275
}
276276

277277
// Parse the width parameter

0 commit comments

Comments
 (0)