From 36a51ddc67d0beb7d9851fb2425cf780a47fed36 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 6 Nov 2026 12:40:11 -0300 Subject: idioms #10, the 9P tree: every bufPrint that fell back to "" or a placeholder is proven to fit (catch unreachable, its why) or cut its argument to fit, /status, /listeners and the 9P reads that staged on gpa answer ENOMEM rather than read short, acme's pane ctl words and pty's files and signals are stringToEnum switches, a dirent's head and name are staged together or not at all, a repeated log record too long to count is pushed as its own line rather than dropped, and daemonList's set is named Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/ninep/cols.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ninep/cols.zig') diff --git a/src/ninep/cols.zig b/src/ninep/cols.zig index 74d1f668..7eb08ba9 100644 --- a/src/ninep/cols.zig +++ b/src/ninep/cols.zig @@ -31,7 +31,7 @@ pub fn activeColumn(p: *const Pardes) ?usize { /// keyboard), `empty` or `full`, and its panes' serials, top to bottom; /// then `active `: the active column, where pane/new and a look /// place a pane next (acme's activecol), not always the keyboard's. -pub fn writeLayout(p: *Pardes, w: *std.Io.Writer) !void { +pub fn writeLayout(p: *Pardes, w: *std.Io.Writer) std.Io.Writer.Error!void { const v = p.view(); const active = activeColumn(p); for (0..p.view().ncol) |c| { @@ -414,7 +414,7 @@ test "Help and Find at /tagexec act in the session's directory, not the keyboard for ([_][]const u8{ "Help\n", "Find needle\n" }) |line| { try testing.expectEqual(tree.Status.ok, th.wr(p, tagexec, line).reply.status); const made = p.panes[p.view().active].?.file.?.path; - try testing.expectEqualStrings(session, std.fs.path.dirname(made).?); + try testing.expectEqualStrings(session, std.Io.Dir.path.dirname(made).?); } } -- cgit v1.3