| ... | @@ -18,8 +18,7 @@ pub fn close(self: File) void { | ... | @@ -18,8 +18,7 @@ pub fn close(self: File) void { |
| 18 | } | 18 | } |
| 19 | | 19 | |
| 20 | pub const ReadError = switch (builtin.target.os.tag) { | 20 | pub 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 | }; |
| 25 | pub usingnamespace nio.Readable(@This(), ._bare); | 24 | pub 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 | } |