aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorLeRoyce Pearson <leroycepearson@geemili.xyz>2020-04-15 19:45:23 -0600
committerAndrew Kelley <andrew@ziglang.org>2020-05-25 13:48:43 -0400
commit4d62d97076a10cc6371fb6cbbfec8c906611a72b (patch)
tree89a3268a45ce38177016d980a2f444dd674835ff /lib/std
parentb429f4607c320118f5e0443605b29dda39521204 (diff)
downloadzig-4d62d97076a10cc6371fb6cbbfec8c906611a72b.tar.gz
zig-4d62d97076a10cc6371fb6cbbfec8c906611a72b.zip
Update code using deprecated ArrayList APIs
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/cache_hash.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/cache_hash.zig b/lib/std/cache_hash.zig
index bff7a09c1a..6fa3d7b5db 100644
--- a/lib/std/cache_hash.zig
+++ b/lib/std/cache_hash.zig
@@ -148,7 +148,7 @@ pub const CacheHash = struct {
var cache_hash_file: *File = undefined;
if (idx < input_file_count) {
- cache_hash_file = self.files.ptrAt(idx);
+ cache_hash_file = &self.files.items[idx];
} else {
cache_hash_file = try self.files.addOne();
cache_hash_file.path = null;
@@ -213,7 +213,7 @@ pub const CacheHash = struct {
self.blake3 = Blake3.init();
self.blake3.update(&bin_digest);
try self.files.resize(input_file_count);
- for (self.files.toSlice()) |file| {
+ for (self.files.items) |file| {
self.blake3.update(&file.bin_digest);
}
return null;
@@ -308,7 +308,7 @@ pub const CacheHash = struct {
var outStream = contents.outStream();
defer contents.deinit();
- for (self.files.toSlice()) |file| {
+ for (self.files.items) |file| {
base64_encoder.encode(encoded_digest[0..], &file.bin_digest);
try outStream.print("{} {} {} {}\n", .{ file.stat.inode, file.stat.mtime, encoded_digest[0..], file.path });
}
@@ -332,7 +332,7 @@ pub const CacheHash = struct {
self.manifest_file.?.close();
- for (self.files.toSlice()) |*file| {
+ for (self.files.items) |*file| {
file.deinit(self.alloc);
}
self.files.deinit();