authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-04-18 15:33:21 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2022-04-18 15:33:21 -07:00
logb6d8d9053373d09caf32873a1a376122c890c274
treec77827562273879f0c4c5c9d6e907467c2e42df3
parentcc5c94aeb57c6a3ffd81b4c9acfe90b1dc9bbbb4

use Witer.writeAll instead of Writer.print when no args


4 files changed, 7 insertions(+), 7 deletions(-)

src/cmd/fetch.zig+1-1
......@@ -248,7 +248,7 @@ fn print_dirs(w: std.fs.File.Writer, list: []const zigmod.Module) !void {
248248 for (list) |mod| {
249249 if (mod.is_sys_lib or mod.is_framework) continue;
250250 if (std.mem.eql(u8, mod.id, "root")) {
251 try w.print(" pub const _root = \"\";\n", .{});
251 try w.writeAll(" pub const _root = \"\";\n");
252252 continue;
253253 }
254254 try w.print(" pub const _{s} = cache ++ \"/{}\";\n", .{ mod.short_id(), std.zig.fmtEscapes(mod.clean_path) });
src/cmd/init.zig+2-2
......@@ -176,7 +176,7 @@ pub fn writeExeManifest(w: std.fs.File.Writer, id: string, name: string, license
176176 try w.print("name: {s}\n", .{name});
177177 if (license) |_| try w.print("license: {s}\n", .{license.?});
178178 if (description) |_| try w.print("description: {s}\n", .{description.?});
179 try w.print("root_dependencies:\n", .{});
179 try w.writeAll("root_dependencies:\n");
180180}
181181
182182pub fn writeLibManifest(w: std.fs.File.Writer, id: string, name: string, entry: string, license: string, description: string) !void {
......@@ -185,7 +185,7 @@ pub fn writeLibManifest(w: std.fs.File.Writer, id: string, name: string, entry:
185185 try w.print("main: {s}\n", .{entry});
186186 try w.print("license: {s}\n", .{license});
187187 try w.print("description: {s}\n", .{description});
188 try w.print("dependencies:\n", .{});
188 try w.writeAll("dependencies:\n");
189189}
190190
191191fn guessCopyrightName() !?string {
src/cmd/license.zig+3-3
......@@ -83,7 +83,7 @@ pub fn execute(args: [][]u8) !void {
8383 try writer.writeAll(ResetIntensity);
8484 for (entry.value_ptr.*.items) |item| {
8585 if (std.mem.eql(u8, item.clean_path, "../..")) {
86 try writer.print("- This\n", .{});
86 try writer.writeAll("- This\n");
8787 } else {
8888 try writer.print("- {s} {s}\n", .{ @tagName(item.dep.?.type), item.dep.?.path });
8989 }
......@@ -91,11 +91,11 @@ pub fn execute(args: [][]u8) !void {
9191 }
9292 if (unspecified_list.items.len > 0) {
9393 try writer.writeAll(Bold);
94 try writer.print("Unspecified:\n", .{});
94 try writer.writeAll("Unspecified:\n");
9595 try writer.writeAll(ResetIntensity);
9696 for (unspecified_list.items) |item| {
9797 if (std.mem.eql(u8, item.clean_path, "../..")) {
98 try writer.print("- This\n", .{});
98 try writer.writeAll("- This\n");
9999 } else {
100100 try writer.print("- {s} {s}\n", .{ @tagName(item.dep.?.type), item.dep.?.path });
101101 }
src/cmd/zpm/add.zig+1-1
......@@ -59,7 +59,7 @@ pub fn execute(args: [][]u8) !void {
5959 try file.seekTo(try file.getEndPos());
6060
6161 const file_w = file.writer();
62 try file_w.print("\n", .{});
62 try file_w.writeAll("\n");
6363 try file_w.print(" - src: git {s}\n", .{u.trim_suffix(found.git, ".git")});
6464 if (!(has_zigdotmod or has_zigmodyml)) {
6565 try file_w.print(" name: {s}\n", .{found.name});