diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 09:55:21 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | f5c48e98b80ad6517c756e8fd15c976d4a2d1894 (patch) | |
| tree | 5816a604bd76d44186d3301508841fbb10a22ef0 /src/ninep/events.zig | |
| parent | 12d387e4a03204a2b6d0c51633e228063e883fad (diff) | |
| download | pardes-f5c48e98b80ad6517c756e8fd15c976d4a2d1894.tar.gz pardes-f5c48e98b80ad6517c756e8fd15c976d4a2d1894.zip | |
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 <[email protected]>
Diffstat (limited to 'src/ninep/events.zig')
| -rw-r--r-- | src/ninep/events.zig | 7 |
1 files changed, 0 insertions, 7 deletions
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 }; |
