From 2e9f8e10cfc8793fdf6ad46b4851e9c165b0e682 Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Sun, 26 Feb 2023 18:32:07 -0600 Subject: [PATCH] added: return_ok and return_err to Result --- core/container/result.onyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/container/result.onyx b/core/container/result.onyx index 4abe691e..ddf9c85f 100644 --- a/core/container/result.onyx +++ b/core/container/result.onyx @@ -21,8 +21,8 @@ Result_Data :: struct (T: type_expr, E: type_expr) { #inject Result { - // Ok :: macro (x: $T) do return .{ .Ok, .{ value = x } }; - // Err :: macro (x: $T) do return .{ .Err, .{ error = x } }; + return_ok :: macro (x: $T) do return .{ .Ok, .{ value = x } }; + return_err :: macro (x: $T) do return .{ .Err, .{ error = x } }; is_ok :: (r: #Self) => r.status == .Ok; -- 2.25.1