Skip to content

Commit

Permalink
remove util.concat
Browse files Browse the repository at this point in the history
  • Loading branch information
nektro committed Oct 23, 2021
1 parent 57bd7b0 commit 08ac5e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/util/funcs.zig
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,7 @@ pub fn repeat(s: string, times: i32) !string {
while (i < times) : (i += 1) {
try list.append(s);
}
return try concat(list.items);
}

pub fn concat(items: []string) !string {
return std.mem.join(gpa, "", items);
return try std.mem.join(gpa, "", list.items);
}

pub fn list_contains(haystack: []const string, needle: string) bool {
Expand Down
2 changes: 1 addition & 1 deletion src/util/module.zig
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub const Module = struct {
pub fn get_hash(self: Module, cdpath: string) !string {
var file_list_1 = std.ArrayList(string).init(gpa);
defer file_list_1.deinit();
try u.file_list(try u.concat(&.{ cdpath, "/", self.clean_path }), &file_list_1);
try u.file_list(try std.mem.concat(gpa, u8, &.{ cdpath, "/", self.clean_path }), &file_list_1);

var file_list_2 = std.ArrayList(string).init(gpa);
defer file_list_2.deinit();
Expand Down

0 comments on commit 08ac5e4

Please sign in to comment.