| ... | @@ -242,7 +242,7 @@ pub const CacheHash = struct { | ... | @@ -242,7 +242,7 @@ pub const CacheHash = struct { |
| 242 | return null; | 242 | return null; |
| 243 | } | 243 | } |
| 244 | | 244 | |
| 245 | return try self.final(); | 245 | return self.final(); |
| 246 | } | 246 | } |
| 247 | | 247 | |
| 248 | pub fn populate_file_hash(self: *@This(), cache_hash_file: *File) !void { | 248 | pub fn populate_file_hash(self: *@This(), cache_hash_file: *File) !void { |
| ... | @@ -259,7 +259,8 @@ pub const CacheHash = struct { | ... | @@ -259,7 +259,8 @@ pub const CacheHash = struct { |
| 259 | self.blake3.update(&cache_hash_file.bin_digest); | 259 | self.blake3.update(&cache_hash_file.bin_digest); |
| 260 | } | 260 | } |
| 261 | | 261 | |
| 262 | pub fn final(self: *@This()) ![BASE64_DIGEST_LEN]u8 { | 262 | /// Returns a base64 encoded hash of the inputs. |
| | 263 | pub fn final(self: *@This()) [BASE64_DIGEST_LEN]u8 { |
| 263 | debug.assert(self.manifest_file != null); | 264 | debug.assert(self.manifest_file != null); |
| 264 | | 265 | |
| 265 | var bin_digest: [BIN_DIGEST_LEN]u8 = undefined; | 266 | var bin_digest: [BIN_DIGEST_LEN]u8 = undefined; |
| ... | @@ -340,7 +341,7 @@ test "cache file and the recall it" { | ... | @@ -340,7 +341,7 @@ test "cache file and the recall it" { |
| 340 | // There should be nothing in the cache | 341 | // There should be nothing in the cache |
| 341 | debug.assert((try ch.hit()) == null); | 342 | debug.assert((try ch.hit()) == null); |
| 342 | | 343 | |
| 343 | digest1 = try ch.final(); | 344 | digest1 = ch.final(); |
| 344 | } | 345 | } |
| 345 | { | 346 | { |
| 346 | var ch = try CacheHash.init(testing.allocator, temp_manifest_dir); | 347 | var ch = try CacheHash.init(testing.allocator, temp_manifest_dir); |