| author | |
| committer | |
| log | fc9e183583dd6299cb4294ecad8739ebbfecb1d0 |
| tree | de73de6fe89da6379efb342ba95a2ac179b4c644 |
| parent | f844b67f8110f601bf6a4ef0d573635dabd7f81d |
2 files changed, 1 insertions(+), 14 deletions(-)
src/cmd/fetch.zig+1-1| ... | @@ -237,7 +237,7 @@ fn print_dirs(w: std.fs.File.Writer, list: []const u.Module) !void { | ... | @@ -237,7 +237,7 @@ fn print_dirs(w: std.fs.File.Writer, list: []const u.Module) !void { |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | fn print_deps(w: std.fs.File.Writer, m: u.Module) !void { | 239 | fn print_deps(w: std.fs.File.Writer, m: u.Module) !void { |
| 240 | try u.print_all(w, .{"&[_]Package{"}, true); | 240 | try w.writeAll("&[_]Package{\n"); |
| 241 | for (m.deps) |d| { | 241 | for (m.deps) |d| { |
| 242 | if (d.main.len == 0) { | 242 | if (d.main.len == 0) { |
| 243 | continue; | 243 | continue; |
src/util/funcs.zig-13| ... | @@ -116,19 +116,6 @@ pub fn concat(items: []string) !string { | ... | @@ -116,19 +116,6 @@ pub fn concat(items: []string) !string { |
| 116 | return std.mem.join(gpa, "", items); | 116 | return std.mem.join(gpa, "", items); |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | pub fn print_all(w: std.fs.File.Writer, items: anytype, ln: bool) !void { | ||
| 120 | inline for (items) |x, i| { | ||
| 121 | if (i == 0) { | ||
| 122 | try w.print("{s}", .{x}); | ||
| 123 | } else { | ||
| 124 | try w.print(" {s}", .{x}); | ||
| 125 | } | ||
| 126 | } | ||
| 127 | if (ln) { | ||
| 128 | try w.print("\n", .{}); | ||
| 129 | } | ||
| 130 | } | ||
| 131 | |||
| 132 | pub fn list_contains(haystack: []const string, needle: string) bool { | 119 | pub fn list_contains(haystack: []const string, needle: string) bool { |
| 133 | for (haystack) |item| { | 120 | for (haystack) |item| { |
| 134 | if (std.mem.eql(u8, item, needle)) { | 121 | if (std.mem.eql(u8, item, needle)) { |