diff --git a/lib/std/cache_hash.zig b/lib/std/cache_hash.zig index 39a7f6535..6fea1b3e2 100644 --- a/lib/std/cache_hash.zig +++ b/lib/std/cache_hash.zig @@ -182,8 +182,10 @@ pub const CacheHash = struct { if (file_path.len == 0) { return error.InvalidFormat; } - if (cache_hash_file.path != null and !mem.eql(u8, file_path, cache_hash_file.path.?)) { - return error.InvalidFormat; + if (cache_hash_file.path) |p| { + if (!mem.eql(u8, file_path, p)) { + return error.InvalidFormat; + } } if (cache_hash_file.path == null) {