authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-14 00:23:33-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-30 22:03:14-08:00
logdd0153b91b55e3b32227562ed68fdaee31c5b844
tree26472ed6494c95ccf90b59681cfb64f85b7da96f
parente56563ce3fb7ae2fb13f66ba6045ffb1f828ae08

std.Io.operate: fix bogus catch

this used to have a different error set. just goes to show you how useful switching on error set is even when there is only 1 prong

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

lib/std/Io.zig+1-1
...@@ -303,7 +303,7 @@ pub const Operation = union(enum) {...@@ -303,7 +303,7 @@ pub const Operation = union(enum) {
303303
304/// Performs one `Operation`.304/// Performs one `Operation`.
305pub fn operate(io: Io, operation: *Operation) Cancelable!void {305pub fn operate(io: Io, operation: *Operation) Cancelable!void {
306 return io.vtable.operate(io.userdata, operation) catch unreachable;306 return io.vtable.operate(io.userdata, operation);
307}307}
308308
309/// Submits many operations together without waiting for all of them to309/// Submits many operations together without waiting for all of them to
lib/std/Io/Threaded.zig+1-1
...@@ -2465,7 +2465,7 @@ fn operate(userdata: ?*anyopaque, op: *Io.Operation) Io.Cancelable!void {...@@ -2465,7 +2465,7 @@ fn operate(userdata: ?*anyopaque, op: *Io.Operation) Io.Cancelable!void {
2465 .file_read_streaming => |*o| {2465 .file_read_streaming => |*o| {
2466 _ = o.status.unstarted;2466 _ = o.status.unstarted;
2467 o.status = .{ .result = fileReadStreaming(o.file, o.data) catch |err| switch (err) {2467 o.status = .{ .result = fileReadStreaming(o.file, o.data) catch |err| switch (err) {
2468 error.Canceled => return error.Canceled,2468 error.Canceled => |e| return e,
2469 else => |e| e,2469 else => |e| e,
2470 } };2470 } };
2471 },2471 },