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 12:10:01-08:00
logd579375a7af91320bd932878d2a5b124e2572b11
treef291f6ec75fdd1239f4e9f9b751e35dea2f8c26a
parent5a2cab21e1cf7c0c5dadb5e6c77c359b0b62ff55

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) {
303303
304304/// Performs one `Operation`.
305305pub 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);
307307}
308308
309309/// 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 {
24652465 .file_read_streaming => |*o| {
24662466 _ = o.status.unstarted;
24672467 o.status = .{ .result = fileReadStreaming(o.file, o.data) catch |err| switch (err) {
2468 error.Canceled => return error.Canceled,
2468 error.Canceled => |e| return e,
24692469 else => |e| e,
24702470 } };
24712471 },