From 4917ae452a15ff4f32d97d215a99fdcfaab29d61 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 13:13:17 -0300 Subject: idioms #9, every catch unreachable this slice added is a fact of the code: each formats integers, literals, an error's name or a slice of a fixed array (the daemon's [128]u8 names, the cache's path_buf, main's cwd_buf, those two buffers now sized from their arrays), so all 39 stay, each with its reason on its own line Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/dump.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dump.zig') diff --git a/src/dump.zig b/src/dump.zig index 04d08142..06721be1 100644 --- a/src/dump.zig +++ b/src/dump.zig @@ -254,7 +254,7 @@ pub fn check(gpa: std.mem.Allocator, bytes: []const u8, why: *[256]u8) !void { error.NoDump => "it holds no dump", error.OutOfMemory => "out of memory", else => "it is no dump of pardes's", - }}) catch unreachable; // a short phrase or an error's name fits 255 + }}) catch unreachable; // a literal or an error's name fits 255 why[said.len] = 0; return err; }; @@ -266,7 +266,7 @@ pub fn check(gpa: std.mem.Allocator, bytes: []const u8, why: *[256]u8) !void { error.BadDump => "it does not begin as one", error.EndOfDump => "it is cut short", else => @errorName(err), - }}) catch unreachable; // a short phrase or an error's name fits 255 + }}) catch unreachable; // a literal or an error's name fits 255 why[said.len] = 0; return err; }; -- cgit v1.3