runner: fix for latest zig

This commit is contained in:
Luna 2019-10-31 19:02:36 -03:00
parent 1c17b714a7
commit 91de05d3b1

View file

@ -117,7 +117,7 @@ pub const Runner = struct {
const basename = std.fs.path.basename(image.path); const basename = std.fs.path.basename(image.path);
const dirname = std.fs.path.dirname(image.path).?; const dirname = std.fs.path.dirname(image.path).?;
var dir = try std.fs.Dir.open(self.allocator, dirname); var dir = try std.fs.Dir.open(dirname);
defer dir.close(); defer dir.close();
const period_idx = std.mem.lastIndexOf(u8, basename, ".").?; const period_idx = std.mem.lastIndexOf(u8, basename, ".").?;
@ -134,7 +134,9 @@ pub const Runner = struct {
var max: usize = 0; var max: usize = 0;
while (try dir.next()) |entry| { var it = dir.iterate();
while (try it.next()) |entry| {
switch (entry.kind) { switch (entry.kind) {
.File => blk: { .File => blk: {
if (!std.mem.startsWith(u8, entry.name, starts_with)) break :blk {}; if (!std.mem.startsWith(u8, entry.name, starts_with)) break :blk {};