| ... | ... | @@ -117,9 +117,7 @@ pub fn fileList(alloc: *std.mem.Allocator, dir: std.fs.Dir) ![]string { |
| 117 | 117 | var walk = try dir.walk(alloc); |
| 118 | 118 | defer walk.deinit(); |
| 119 | 119 | while (try walk.next()) |entry| { |
| 120 | | if (entry.kind != .File) { |
| 121 | | continue; |
| 122 | | } |
| 120 | if (entry.kind != .File) continue; |
| 123 | 121 | try list.append(try alloc.dupe(u8, entry.path)); |
| 124 | 122 | } |
| 125 | 123 | return list.toOwnedSlice(); |
| ... | ... | @@ -131,9 +129,7 @@ pub fn dirSize(alloc: *std.mem.Allocator, dir: std.fs.Dir) !usize { |
| 131 | 129 | var walk = try dir.walk(alloc); |
| 132 | 130 | defer walk.deinit(); |
| 133 | 131 | while (try walk.next()) |entry| { |
| 134 | | if (entry.kind != .File) { |
| 135 | | continue; |
| 136 | | } |
| 132 | if (entry.kind != .File) continue; |
| 137 | 133 | res += try fileSize(dir, entry.path); |
| 138 | 134 | } |
| 139 | 135 | return res; |