Skip to content

Commit 5fbae30

Browse files
use range instead of enumerating all digits
1 parent 821a929 commit 5fbae30

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
@@ -275,7 +275,7 @@ pub const Placeholder = struct {
275275
if (fill == null and alignment == null) {
276276
fill = comptime if (parser.peek(0)) |ch| init: {
277277
switch (ch) {
278-
'.', '1', '2', '3', '4', '5', '6', '7', '8', '9' => break :init null,
278+
'1'...'9', '.' => break :init null,
279279
else => {
280280
_ = parser.char(); // consume the character
281281
break :init ch;

0 commit comments

Comments
 (0)