summaryrefslogtreecommitdiff
path: root/src/colors.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/colors.zig')
-rw-r--r--src/colors.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/colors.zig b/src/colors.zig
index 65fd4056..f9e5495f 100644
--- a/src/colors.zig
+++ b/src/colors.zig
@@ -673,10 +673,10 @@ fn themeFileError(p: *Pardes, request: ThemeFileRequest, err: anyerror) void {
}
fn themeFileFailure(p: *Pardes, request: ThemeFileRequest, why: []const u8) void {
- var said: [520]u8 = undefined;
+ var said: pardes.Kind.Buf(520) = .{};
var cut: [200]u8 = undefined;
const path = @import("ninep/tree.zig").fitErr(request.path, &cut);
- p.reportFailure(request.pane, std.fmt.bufPrint(&said, "theme file {s}: {s}", .{ path, why }) catch unreachable); // two 200-byte parts fit 520
+ p.reportFailure(request.pane, said.print("theme file {s}: {s}", .{ path, why }));
revertThemeFile(p);
}
@@ -778,7 +778,7 @@ pub fn themesNear(buf: []u8, name: []const u8) []const u8 {
fn putName(w: *std.Io.Writer, cap: usize, name: []const u8) bool {
const sep: []const u8 = if (w.buffered().len > 0) " " else "";
if (w.buffered().len + sep.len + name.len > cap) return false;
- w.print("{s}{s}", .{ sep, name }) catch unreachable; // fits: checked above
+ w.print("{s}{s}", .{ sep, name }) catch return false;
return true;
}