authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-10-22 18:24:33 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-10-22 18:24:33 -07:00
log08ac5e4e5ea84a9b8c529715595cfc4d940a1db5
tree37a3ec96068c839acf140049ece49dcbcf99c38f
parent57bd7b0d9500e18871d29244677e3a1d461cf216

remove util.concat


2 files changed, 2 insertions(+), 6 deletions(-)

src/util/funcs.zig+1-5
...@@ -101,11 +101,7 @@ pub fn repeat(s: string, times: i32) !string {...@@ -101,11 +101,7 @@ pub fn repeat(s: string, times: i32) !string {
101 while (i < times) : (i += 1) {101 while (i < times) : (i += 1) {
102 try list.append(s);102 try list.append(s);
103 }103 }
104 return try concat(list.items);104 return try std.mem.join(gpa, "", list.items);
105}
106
107pub fn concat(items: []string) !string {
108 return std.mem.join(gpa, "", items);
109}105}
110106
111pub fn list_contains(haystack: []const string, needle: string) bool {107pub fn list_contains(haystack: []const string, needle: string) bool {
src/util/module.zig+1-1
...@@ -57,7 +57,7 @@ pub const Module = struct {...@@ -57,7 +57,7 @@ pub const Module = struct {
57 pub fn get_hash(self: Module, cdpath: string) !string {57 pub fn get_hash(self: Module, cdpath: string) !string {
58 var file_list_1 = std.ArrayList(string).init(gpa);58 var file_list_1 = std.ArrayList(string).init(gpa);
59 defer file_list_1.deinit();59 defer file_list_1.deinit();
60 try u.file_list(try u.concat(&.{ cdpath, "/", self.clean_path }), &file_list_1);60 try u.file_list(try std.mem.concat(gpa, u8, &.{ cdpath, "/", self.clean_path }), &file_list_1);
6161
62 var file_list_2 = std.ArrayList(string).init(gpa);62 var file_list_2 = std.ArrayList(string).init(gpa);
63 defer file_list_2.deinit();63 defer file_list_2.deinit();