From f5c48e98b80ad6517c756e8fd15c976d4a2d1894 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 09:55:21 -0300 Subject: Inline the one-line helpers in src/ninep at their call sites reads, paneFileNamed, topFileNamed, serialNamed, attrReply, makePane, events.pending, mtimeOf, versionOf, dirOf, cellOf, shiftBy, flagOf, stageIndexLine, ctlLen, listenersLen, activeSerial, fontName and Serials.has each wrapped a line or two used once or twice; the logic now reads where it is used. Helpers that do several things or are shared widely (bodyOf, fileOf, dirtyOf, nameOf, kindOf, clip, readRange, readFlag, pty's answer and waitingRun, nextSerialAfter) stay. Co-Authored-By: Claude Opus 5.5 --- src/ninep/events.zig | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/ninep/events.zig') diff --git a/src/ninep/events.zig b/src/ninep/events.zig index 49e852b3..a501d1e2 100644 --- a/src/ninep/events.zig +++ b/src/ninep/events.zig @@ -96,13 +96,6 @@ pub const Queue = struct { } }; -/// What the next read would answer, which is the size a stat reports: a -/// client can see there is something waiting without parking on it. -pub fn pending(q: *const Queue) u64 { - const record = q.peek() orelse return 0; - return record.len; -} - /// One record per read; `.again` holds the read until a record arrives. pub fn readQueue(p: *Pardes, req: Req, q: *Queue) Reply { const record = q.peek() orelse return .{ .tag = req.tag, .status = .again }; -- cgit v1.3