authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-12-02 01:15:54 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-12-02 01:15:54 -08:00
logabeab3b74c5cefc398f80dc0d2ec7c7e9cd64d21
tree56d30cab01eecac8624394347ec03a133139000e
parent3641ae4e3873dc51486631f7db1939d228dd54f6

cmd/fetch- use writeAll over print


1 files changed, 3 insertions(+), 2 deletions(-)

src/cmd/fetch.zig+3-2
...@@ -51,7 +51,7 @@ pub fn create_depszig(cachepath: string, dir: std.fs.Dir, top_module: zigmod.Mod...@@ -51,7 +51,7 @@ pub fn create_depszig(cachepath: string, dir: std.fs.Dir, top_module: zigmod.Mod
51 try w.writeAll("\n");51 try w.writeAll("\n");
52 try w.print("pub const cache = \"{}\";\n", .{std.zig.fmtEscapes(cachepath)});52 try w.print("pub const cache = \"{}\";\n", .{std.zig.fmtEscapes(cachepath)});
53 try w.writeAll("\n");53 try w.writeAll("\n");
54 try w.print("{s}\n", .{54 try w.writeAll(
55 \\pub fn addAllTo(exe: *std.build.LibExeObjStep) void {55 \\pub fn addAllTo(exe: *std.build.LibExeObjStep) void {
56 \\ @setEvalBranchQuota(1_000_000);56 \\ @setEvalBranchQuota(1_000_000);
57 \\ for (packages) |pkg| {57 \\ for (packages) |pkg| {
...@@ -87,7 +87,8 @@ pub fn create_depszig(cachepath: string, dir: std.fs.Dir, top_module: zigmod.Mod...@@ -87,7 +87,8 @@ pub fn create_depszig(cachepath: string, dir: std.fs.Dir, top_module: zigmod.Mod
87 \\ system_libs: []const string = &.{},87 \\ system_libs: []const string = &.{},
88 \\};88 \\};
89 \\89 \\
90 });90 \\
91 );
9192
92 try w.writeAll("const dirs = struct {\n");93 try w.writeAll("const dirs = struct {\n");
93 try print_dirs(w, list.items);94 try print_dirs(w, list.items);