authorgravatar for leroycepearson@geemili.xyzLeRoyce Pearson <leroycepearson@geemili.xyz> 2020-04-15 19:45:23-06:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-05-25 13:48:43-04:00
log4d62d97076a10cc6371fb6cbbfec8c906611a72b
tree89a3268a45ce38177016d980a2f444dd674835ff
parentb429f4607c320118f5e0443605b29dda39521204

Update code using deprecated ArrayList APIs


1 files changed, 4 insertions(+), 4 deletions(-)

lib/std/cache_hash.zig+4-4
......@@ -148,7 +148,7 @@ pub const CacheHash = struct {
148148
149149 var cache_hash_file: *File = undefined;
150150 if (idx < input_file_count) {
151 cache_hash_file = self.files.ptrAt(idx);
151 cache_hash_file = &self.files.items[idx];
152152 } else {
153153 cache_hash_file = try self.files.addOne();
154154 cache_hash_file.path = null;
......@@ -213,7 +213,7 @@ pub const CacheHash = struct {
213213 self.blake3 = Blake3.init();
214214 self.blake3.update(&bin_digest);
215215 try self.files.resize(input_file_count);
216 for (self.files.toSlice()) |file| {
216 for (self.files.items) |file| {
217217 self.blake3.update(&file.bin_digest);
218218 }
219219 return null;
......@@ -308,7 +308,7 @@ pub const CacheHash = struct {
308308 var outStream = contents.outStream();
309309 defer contents.deinit();
310310
311 for (self.files.toSlice()) |file| {
311 for (self.files.items) |file| {
312312 base64_encoder.encode(encoded_digest[0..], &file.bin_digest);
313313 try outStream.print("{} {} {} {}\n", .{ file.stat.inode, file.stat.mtime, encoded_digest[0..], file.path });
314314 }
......@@ -332,7 +332,7 @@ pub const CacheHash = struct {
332332
333333 self.manifest_file.?.close();
334334
335 for (self.files.toSlice()) |*file| {
335 for (self.files.items) |*file| {
336336 file.deinit(self.alloc);
337337 }
338338 self.files.deinit();