From 9bd648bd4099d4ba14785bea4d7e0aa9e81fb105 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 30 Jan 2026 20:54:06 -0800 Subject: [PATCH] std.Io.Operation: support non-fallible results --- lib/std/Io.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/Io.zig b/lib/std/Io.zig index 16d056ed0f18ec12cb0843d6d0c5d34e7ad70400..74ddd1dccf72863945c4d0025d1b19e9522a49f1 100644 --- a/lib/std/Io.zig +++ b/lib/std/Io.zig @@ -287,7 +287,7 @@ pub const Operation = union(enum) { LockViolation, } || Io.UnexpectedError; - pub const Result = usize; + pub const Result = Error!usize; }; pub const Result = Result: { @@ -296,7 +296,7 @@ pub const Operation = union(enum) { var field_types: [operation_fields.len]type = undefined; for (operation_fields, &field_names, &field_types) |field, *field_name, *field_type| { field_name.* = field.name; - field_type.* = field.type.Error!field.type.Result; + field_type.* = field.type.Result; } break :Result @Union(.auto, Tag, &field_names, &field_types, &@splat(.{})); }; -- 2.54.0