| ... | ... | @@ -58,7 +58,7 @@ fn make_csi_sequence(comptime c: []const u8, comptime x: anytype) []const u8 { |
| 58 | 58 | |
| 59 | 59 | fn arr_i_to_s(x: anytype) [][]const u8 { |
| 60 | 60 | var res: [x.len][]const u8 = undefined; |
| 61 | | for (x) |item, i| { |
| 61 | for (x, 0..) |item, i| { |
| 62 | 62 | res[i] = std.fmt.comptimePrint("{}", .{item}); |
| 63 | 63 | } |
| 64 | 64 | return &res; |
| ... | ... | @@ -210,7 +210,7 @@ pub const color = struct { |
| 210 | 210 | |
| 211 | 211 | fn _join(comptime delim: []const u8, comptime xs: [][]const u8) []const u8 { |
| 212 | 212 | var buf: []const u8 = ""; |
| 213 | | for (xs) |x, i| { |
| 213 | for (xs, 0..) |x, i| { |
| 214 | 214 | buf = buf ++ x; |
| 215 | 215 | if (i < xs.len - 1) buf = buf ++ delim; |
| 216 | 216 | } |