authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-01-02 19:11:44 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-01-02 19:11:44 -08:00
log13c63000cecd9a2d66efa68e62d02dbc3fbae3fd
tree2f3664b3a808f2c2aa37e2e3e30f30bf1b0ac04d
parentb31c8f71fa44e38c842898c85c37d495cd9a5e1c

tidy a bit


2 files changed, 3 insertions(+), 7 deletions(-)

File.zig+2-5
...@@ -18,8 +18,7 @@ pub fn close(self: File) void {...@@ -18,8 +18,7 @@ pub fn close(self: File) void {
18}18}
1919
20pub const ReadError = switch (builtin.target.os.tag) {20pub const ReadError = switch (builtin.target.os.tag) {
21 .linux,21 .linux => sys_linux.errno.Error,
22 => sys_linux.errno.Error,
23 else => @compileError("TODO"),22 else => @compileError("TODO"),
24};23};
25pub usingnamespace nio.Readable(@This(), ._bare);24pub usingnamespace nio.Readable(@This(), ._bare);
...@@ -37,9 +36,7 @@ pub fn anyReadable(self: File) nio.AnyReadable {...@@ -37,9 +36,7 @@ pub fn anyReadable(self: File) nio.AnyReadable {
37 }36 }
38 };37 };
39 return .{38 return .{
40 .vtable = &.{39 .vtable = &.{ .read = S.read },
41 .read = S.read,
42 },
43 .state = @ptrFromInt(@as(usize, @bitCast(@as(isize, @intCast(@intFromEnum(self.fd)))))),40 .state = @ptrFromInt(@as(usize, @bitCast(@as(isize, @intCast(@intFromEnum(self.fd)))))),
44 };41 };
45}42}
nfs.zig+1-2
...@@ -8,8 +8,7 @@ pub const File = @import("./File.zig");...@@ -8,8 +8,7 @@ pub const File = @import("./File.zig");
8const os = builtin.target.os.tag;8const os = builtin.target.os.tag;
99
10pub const Handle = switch (os) {10pub const Handle = switch (os) {
11 .linux,11 .linux => enum(c_int) { _ },
12 => enum(c_int) { _ },
13 else => @compileError("TODO"),12 else => @compileError("TODO"),
14};13};
1514