@@ -183,7 +183,7 @@ pub fn complete(self: *@This(), mode: aio.CompletionMode, handler: anytype) aio.
183183 if (pfd .revents & std .posix .POLL .ERR != 0 ) {
184184 switch (op_type ) {
185185 inline else = > | tag | {
186- if (hasField (Operation . map . getAssertContains ( tag ).Error , "BrokenPipe" )) {
186+ if (hasField (tag . Type ( ).Error , "BrokenPipe" )) {
187187 Uringlator .debug ("poll: {}: {} => ERR (BrokenPipe)" , .{ id , op_type });
188188 self .uringlator .finish (self , id , error .BrokenPipe , .thread_unsafe );
189189 } else {
@@ -248,7 +248,7 @@ pub fn immediate(pairs: anytype) aio.Error!u16 {
248248 return num_errors ;
249249}
250250
251- fn blockingPosixExecutor (self : * @This (), comptime op_type : Operation , op : Operation . map . getAssertContains ( op_type ), id : aio.Id , readiness : posix.Readiness , comptime safety : Uringlator .Safety ) void {
251+ fn blockingPosixExecutor (self : * @This (), comptime op_type : Operation , op : op_type . Type ( ), id : aio.Id , readiness : posix.Readiness , comptime safety : Uringlator .Safety ) void {
252252 var failure : Operation.Error = error .Success ;
253253 while (true ) {
254254 posix .perform (op_type , op , readiness ) catch | err | {
@@ -260,7 +260,7 @@ fn blockingPosixExecutor(self: *@This(), comptime op_type: Operation, op: Operat
260260 self .uringlator .finish (self , id , failure , safety );
261261}
262262
263- fn posixPerform (self : * @This (), comptime op_type : Operation , op : Operation . map . getAssertContains ( op_type ), id : aio.Id , readiness : posix.Readiness , kludge : enum { kludge , normal }) ! void {
263+ fn posixPerform (self : * @This (), comptime op_type : Operation , op : op_type . Type ( ), id : aio.Id , readiness : posix.Readiness , kludge : enum { kludge , normal }) ! void {
264264 if (needs_kludge and ! builtin .single_threaded and kludge == .kludge ) {
265265 if (self .in_flight_threaded == 0 ) {
266266 self .pfd .add (.{ .fd = self .source .fd , .events = std .posix .POLL .IN , .revents = 0 }) catch unreachable ;
@@ -280,7 +280,7 @@ fn posixPerform(self: *@This(), comptime op_type: Operation, op: Operation.map.g
280280 }
281281}
282282
283- fn nonBlockingPosixExecutor (self : * @This (), comptime op_type : Operation , op : Operation . map . getAssertContains ( op_type ), id : aio.Id , readiness : posix .Readiness ) error {WouldBlock }! void {
283+ fn nonBlockingPosixExecutor (self : * @This (), comptime op_type : Operation , op : op_type . Type ( ), id : aio.Id , readiness : posix .Readiness ) error {WouldBlock }! void {
284284 var failure : Operation.Error = error .Success ;
285285 posix .perform (op_type , op , readiness ) catch | err | {
286286 if (err == error .WouldBlock ) return error .WouldBlock ;
@@ -289,7 +289,7 @@ fn nonBlockingPosixExecutor(self: *@This(), comptime op_type: Operation, op: Ope
289289 self .uringlator .finish (self , id , failure , .thread_unsafe );
290290}
291291
292- fn nonBlockingPosixExecutorFcntl (self : * @This (), comptime op_type : Operation , op : Operation . map . getAssertContains ( op_type ), id : aio.Id , readiness : posix .Readiness ) error { WouldBlock , FcntlFailed }! void {
292+ fn nonBlockingPosixExecutorFcntl (self : * @This (), comptime op_type : Operation , op : op_type . Type ( ), id : aio.Id , readiness : posix .Readiness ) error { WouldBlock , FcntlFailed }! void {
293293 const NONBLOCK = 1 << @bitOffsetOf (std .posix .O , "NONBLOCK" );
294294 const old : struct { usize , bool } = blk : {
295295 if (readiness .fd != posix .invalid_fd ) {
@@ -313,7 +313,7 @@ fn nonBlockingPosixExecutorFcntl(self: *@This(), comptime op_type: Operation, op
313313 self .uringlator .finish (self , id , failure , .thread_unsafe );
314314}
315315
316- fn openReadiness (comptime op_type : Operation , op : Operation . map . getAssertContains ( op_type )) ! posix.Readiness {
316+ fn openReadiness (comptime op_type : Operation , op : op_type . Type ( )) ! posix.Readiness {
317317 return switch (op_type ) {
318318 .nop = > .{},
319319 .fsync = > .{},
@@ -344,7 +344,7 @@ fn openReadiness(comptime op_type: Operation, op: Operation.map.getAssertContain
344344 };
345345}
346346
347- pub fn uringlator_queue (self : * @This (), id : aio .Id , comptime op_type : Operation , op : Operation . map . getAssertContains ( op_type )) aio .Error ! PosixOperation {
347+ pub fn uringlator_queue (self : * @This (), id : aio .Id , comptime op_type : Operation , op : op_type . Type ( )) aio .Error ! PosixOperation {
348348 comptime {
349349 if (needs_kludge and builtin .single_threaded and op_type == .read_tty ) {
350350 @compileError (
@@ -374,7 +374,7 @@ pub fn uringlator_queue(self: *@This(), id: aio.Id, comptime op_type: Operation,
374374 return .{ .readiness = readiness };
375375}
376376
377- pub fn uringlator_dequeue (self : * @This (), id : aio .Id , comptime op_type : Operation , op : Operation . map . getAssertContains ( op_type )) void {
377+ pub fn uringlator_dequeue (self : * @This (), id : aio .Id , comptime op_type : Operation , op : op_type . Type ( )) void {
378378 switch (op_type ) {
379379 .child_exit = > {
380380 const readiness = self .uringlator .ops .getOne (.readiness , id );
0 commit comments