authorgravatar for leroycepearson@geemili.xyzLeRoyce Pearson <leroycepearson@geemili.xyz> 2020-03-06 20:23:15-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-05-25 13:48:43-04:00
log55a3925ab79adae174faa97ae132518541c549cb
tree823b9b2b4e36d47fde23ec5dbafd921a1ed1d885
parentc8062321b3838b35bdf9931026cbea1f67ba6bc1

Rename CacheHashFile -> File


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

lib/std/cache_hash.zig+5-5
...@@ -14,7 +14,7 @@ const base64_encoder = fs.base64_encoder;...@@ -14,7 +14,7 @@ const base64_encoder = fs.base64_encoder;
14const base64_decoder = fs.base64_decoder;14const base64_decoder = fs.base64_decoder;
15const BIN_DIGEST_LEN = 32;15const BIN_DIGEST_LEN = 32;
1616
17pub const CacheHashFile = struct {17pub const File = struct {
18 path: ?[]const u8,18 path: ?[]const u8,
19 stat: fs.File.Stat,19 stat: fs.File.Stat,
20 file_handle: os.fd_t,20 file_handle: os.fd_t,
...@@ -41,7 +41,7 @@ pub const CacheHash = struct {...@@ -41,7 +41,7 @@ pub const CacheHash = struct {
41 manifest_file: ?fs.File,41 manifest_file: ?fs.File,
42 manifest_dirty: bool,42 manifest_dirty: bool,
43 force_check_manifest: bool,43 force_check_manifest: bool,
44 files: ArrayList(CacheHashFile),44 files: ArrayList(File),
45 b64_digest: ArrayList(u8),45 b64_digest: ArrayList(u8),
4646
47 pub fn init(alloc: *Allocator, manifest_dir_path: []const u8) !@This() {47 pub fn init(alloc: *Allocator, manifest_dir_path: []const u8) !@This() {
...@@ -53,7 +53,7 @@ pub const CacheHash = struct {...@@ -53,7 +53,7 @@ pub const CacheHash = struct {
53 .manifest_file = null,53 .manifest_file = null,
54 .manifest_dirty = false,54 .manifest_dirty = false,
55 .force_check_manifest = false,55 .force_check_manifest = false,
56 .files = ArrayList(CacheHashFile).init(alloc),56 .files = ArrayList(File).init(alloc),
57 .b64_digest = ArrayList(u8).init(alloc),57 .b64_digest = ArrayList(u8).init(alloc),
58 };58 };
59 }59 }
...@@ -147,7 +147,7 @@ pub const CacheHash = struct {...@@ -147,7 +147,7 @@ pub const CacheHash = struct {
147 while (line_iter.next()) |line| {147 while (line_iter.next()) |line| {
148 defer idx += 1;148 defer idx += 1;
149149
150 var cache_hash_file: *CacheHashFile = undefined;150 var cache_hash_file: *File = undefined;
151 if (idx < input_file_count) {151 if (idx < input_file_count) {
152 cache_hash_file = self.files.ptrAt(idx);152 cache_hash_file = self.files.ptrAt(idx);
153 } else {153 } else {
...@@ -230,7 +230,7 @@ pub const CacheHash = struct {...@@ -230,7 +230,7 @@ pub const CacheHash = struct {
230 return true;230 return true;
231 }231 }
232232
233 pub fn populate_file_hash(self: *@This(), cache_hash_file: *CacheHashFile) !void {233 pub fn populate_file_hash(self: *@This(), cache_hash_file: *File) !void {
234 debug.assert(cache_hash_file.path != null);234 debug.assert(cache_hash_file.path != null);
235235
236 const this_file = try fs.cwd().openFile(cache_hash_file.path.?, .{});236 const this_file = try fs.cwd().openFile(cache_hash_file.path.?, .{});