From e75a6e514444849ca32de88511804c888137b9a1 Mon Sep 17 00:00:00 2001 From: LeRoyce Pearson Date: Fri, 6 Mar 2020 21:59:58 -0700 Subject: [PATCH] Rename `cache_file` -> `addFile` --- lib/std/cache_hash.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/std/cache_hash.zig b/lib/std/cache_hash.zig index 2b1d86a1e..20d5300b7 100644 --- a/lib/std/cache_hash.zig +++ b/lib/std/cache_hash.zig @@ -117,7 +117,7 @@ pub const CacheHash = struct { } } - pub fn cache_file(self: *@This(), file_path: []const u8) !void { + pub fn addFile(self: *@This(), file_path: []const u8) !void { debug.assert(self.manifest_file == null); var cache_hash_file = try self.files.addOne(); @@ -344,7 +344,7 @@ test "cache file and the recall it" { ch.add(true); ch.add(@as(u16, 1234)); ch.add("1234"); - try ch.cache_file("test.txt"); + try ch.addFile("test.txt"); // There should be nothing in the cache debug.assert((try ch.hit(&digest1)) == false); @@ -358,7 +358,7 @@ test "cache file and the recall it" { ch.add(true); ch.add(@as(u16, 1234)); ch.add("1234"); - try ch.cache_file("test.txt"); + try ch.addFile("test.txt"); // Cache hit! We just "built" the same file debug.assert((try ch.hit(&digest2)) == true);